소스 검색

auto upload: only files, no folders

tobiasKaminsky 8 년 전
부모
커밋
bdf8e58d22
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);