Fixed NULL pointers and wrong handling of dialogs
[pub/Android/ownCloud.git] / src / com / owncloud / android / operations / SynchronizeFolderOperation.java
index 36c3f3f..d2e45a4 100644 (file)
@@ -296,14 +296,10 @@ public class SynchronizeFolderOperation extends RemoteOperation {
     private void checkAndFixForeignStoragePath(OCFile file) {
         String storagePath = file.getStoragePath();
         String expectedPath = FileStorageUtils.getDefaultSavePathFor(mAccount.name, file);
-        File ocLocalFolder = new File(FileStorageUtils.getSavePath(mAccount.name));
         if (storagePath != null && !storagePath.equals(expectedPath)) {
             /// fix storagePaths out of the local ownCloud folder
             File originalFile = new File(storagePath);
-            mForgottenLocalFiles.put(file.getRemotePath(), storagePath);    // TODO REMOVE
-            
-            /*  TO TEST NOTIFICATION!!! - TODO UNCOMMENT
-            if (ocLocalFolder.getUsableSpace() < originalFile.length()) {
+            if (FileStorageUtils.getUsableSpace(mAccount.name) < originalFile.length()) {
                 mForgottenLocalFiles.put(file.getRemotePath(), storagePath);
                 file.setStoragePath(null);
                     
@@ -338,7 +334,6 @@ public class SynchronizeFolderOperation extends RemoteOperation {
                     }
                 }
             }
-            */
         }
     }