Fixing rare crashes in the login page
[pub/Android/ownCloud.git] / src / eu / alefzero / webdav / FileRequestEntity.java
index ca16e89..2a3ba02 100644 (file)
@@ -8,7 +8,10 @@ import java.io.OutputStream;
 
 import org.apache.commons.httpclient.methods.RequestEntity;
 
-import eu.alefzero.owncloud.files.interfaces.OnDatatransferProgressListener;
+import eu.alefzero.webdav.OnDatatransferProgressListener;
+
+import android.util.Log;
+
 
 /**
  * A RequestEntity that represents a File.
@@ -55,6 +58,10 @@ public class FileRequestEntity implements RequestEntity {
                 if (listener != null) 
                     listener.transferProgress(i);
             }
+        } catch (IOException io) {
+            Log.e("FileRequestException", io.getMessage());
+            throw new RuntimeException("Ugly solution to workaround the default policy of retries when the server falls while uploading ; temporal fix; really", io);   
+            
         } finally {
             instream.close();
         }