浏览代码

Small tweaks in rename operation

David A. Velasco 11 年之前
父节点
当前提交
04327e1f16

+ 2 - 2
oc_framework/src/com/owncloud/android/oc_framework/network/webdav/OwnCloudClientFactory.java

@@ -78,8 +78,8 @@ public class OwnCloudClientFactory {
             
         } else {
             String username = account.name.substring(0, account.name.lastIndexOf('@'));
-            String password = am.getPassword(account);
-            //String password = am.blockingGetAuthToken(account, AccountTypeUtils.getAuthTokenTypePass(account.type), false);
+            //String password = am.getPassword(account);
+            String password = am.blockingGetAuthToken(account, AccountTypeUtils.getAuthTokenTypePass(account.type), false);
             client.setBasicCredentials(username, password);
         }
         

+ 1 - 5
src/com/owncloud/android/operations/RenameFileOperation.java

@@ -110,14 +110,10 @@ public class RenameFileOperation extends RemoteOperation {
                     saveLocalFile();
                 }
             }
-        } catch (HttpException e) {
-            Log_OC.e(TAG, "Rename " + mFile.getRemotePath() + " to " + ((mNewRemotePath==null) ? mNewName : mNewRemotePath) + ": " + 
-                    ((result!= null) ? result.getLogMessage() : ""), e);
-            e.printStackTrace();
+            
         } catch (IOException e) {
             Log_OC.e(TAG, "Rename " + mFile.getRemotePath() + " to " + ((mNewRemotePath==null) ? mNewName : mNewRemotePath) + ": " + 
                     ((result!= null) ? result.getLogMessage() : ""), e);
-            e.printStackTrace();
         }
 
         return result;