Avoid duplicated 'refresh file' entry in context menu on an item in the list of files
[pub/Android/ownCloud.git] / src / eu / alefzero / webdav / WebdavClient.java
index 704e14a..9830f66 100644 (file)
@@ -3,9 +3,8 @@
  *   Copyright (C) 2012-2013 ownCloud Inc.
  *
  *   This program is free software: you can redistribute it and/or modify
  *   Copyright (C) 2012-2013 ownCloud Inc.
  *
  *   This program is free software: you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation, either version 2 of the License, or
- *   (at your option) any later version.
+ *   it under the terms of the GNU General Public License version 2,
+ *   as published by the Free Software Foundation.
  *
  *   This program is distributed in the hope that it will be useful,
  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
  *
  *   This program is distributed in the hope that it will be useful,
  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -110,6 +109,7 @@ public class WebdavClient extends HttpClient {
                 exhaustResponse(get.getResponseBodyAsStream());
             }
             Log_OC.e(TAG, "Download of " + remoteFilePath + " to " + targetFile + " finished with HTTP status " + status + (!ret?"(FAIL)":""));
                 exhaustResponse(get.getResponseBodyAsStream());
             }
             Log_OC.e(TAG, "Download of " + remoteFilePath + " to " + targetFile + " finished with HTTP status " + status + (!ret?"(FAIL)":""));
+            
         } catch (Exception e) {
             logException(e, "dowloading " + remoteFilePath);
             
         } catch (Exception e) {
             logException(e, "dowloading " + remoteFilePath);
             
@@ -135,7 +135,7 @@ public class WebdavClient extends HttpClient {
             ret = (status == HttpStatus.SC_OK || status == HttpStatus.SC_ACCEPTED || status == HttpStatus.SC_NO_CONTENT);
             exhaustResponse(delete.getResponseBodyAsStream());
             
             ret = (status == HttpStatus.SC_OK || status == HttpStatus.SC_ACCEPTED || status == HttpStatus.SC_NO_CONTENT);
             exhaustResponse(delete.getResponseBodyAsStream());
             
-            Log.e(TAG, "DELETE of " + remoteFilePath + " finished with HTTP status " + status +  (!ret?"(FAIL)":""));
+            Log_OC.e(TAG, "DELETE of " + remoteFilePath + " finished with HTTP status " + status +  (!ret?"(FAIL)":""));
             
         } catch (Exception e) {
             logException(e, "deleting " + remoteFilePath);
             
         } catch (Exception e) {
             logException(e, "deleting " + remoteFilePath);
@@ -168,7 +168,7 @@ public class WebdavClient extends HttpClient {
         try {
             File f = new File(localFile);
             FileRequestEntity entity = new FileRequestEntity(f, contentType);
         try {
             File f = new File(localFile);
             FileRequestEntity entity = new FileRequestEntity(f, contentType);
-            entity.addOnDatatransferProgressListener(mDataTransferListener);
+            entity.addDatatransferProgressListener(mDataTransferListener);
             put.setRequestEntity(entity);
             status = executeMethod(put);
             
             put.setRequestEntity(entity);
             status = executeMethod(put);
             
@@ -251,7 +251,6 @@ public class WebdavClient extends HttpClient {
         }
     }
 
         }
     }
 
-
     /**
      * Requests the received method with the received timeout (milliseconds).
      * 
     /**
      * Requests the received method with the received timeout (milliseconds).
      * 
@@ -300,7 +299,6 @@ public class WebdavClient extends HttpClient {
         }
     }
 
         }
     }
 
-
     /**
      * Logs an exception triggered in a HTTP request. 
      * 
     /**
      * Logs an exception triggered in a HTTP request. 
      *