浏览代码

Merge pull request #469 from nextcloud/autoUploadOnlyFiles

auto upload: only files, no folders
Andy Scherzinger 8 年之前
父节点
当前提交
f2331a089f
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/com/owncloud/android/services/observer/SyncedFolderObserver.java

+ 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);