Fixed lack of File#getUsableSpace() in Android versions previous to GINGERBREAD
[pub/Android/ownCloud.git] / src / com / owncloud / android / ui / activity / UploadFilesActivity.java
index 84c8959..516781c 100644 (file)
@@ -319,9 +319,7 @@ public class UploadFilesActivity extends SherlockFragmentActivity implements
                 File localFile = new File(localPath);
                 total += localFile.length();
             }
-            String savePath = FileStorageUtils.getSavePath(mAccount.name);
-            File saveDir = new File(savePath);
-            return (saveDir.getUsableSpace() >= total);
+            return (FileStorageUtils.getUsableSpace(mAccount.name) >= total);
         }
 
         /**