Browse Source

auto upload: only files, no folders

tobiasKaminsky 8 years ago
parent
commit
bdf8e58d22

+ 2 - 1
src/com/owncloud/android/services/observer/SyncedFolderObserver.java

@@ -43,7 +43,8 @@ class SyncedFolderObserver extends RecursiveFileObserver {
 
         File temp = new File(path);
 
-        if (!temp.getName().equalsIgnoreCase("null") && !temp.getName().endsWith(".tmp")) {
+        // do not upload "null"-files, test if file exists and is a real file
+        if (!temp.getName().equalsIgnoreCase("null") && temp.isFile() && !temp.getName().endsWith(".tmp")) {
             PersistableBundle bundle = new PersistableBundle();
             // TODO extract
             bundle.putString(SyncedFolderJobService.LOCAL_PATH, path);