Commit 8c9d0f28 authored by vince-bourgmayer's avatar vince-bourgmayer
Browse files

add filter on already store folder to prevent sync of hidden media folder

parent 2cf1ffc5
Pipeline #20874 passed with stage
in 2 minutes and 12 seconds
...@@ -64,8 +64,18 @@ public class ListFileRemoteOperation extends RemoteOperation { ...@@ -64,8 +64,18 @@ public class ListFileRemoteOperation extends RemoteOperation {
//Get CurrentSyncedFolder //Get CurrentSyncedFolder
SyncedFolder syncedFolder = mSyncedFolderIterator.next(); SyncedFolder syncedFolder = mSyncedFolderIterator.next();
//if folder is media type() && is an hidden folder then ignore it
if(syncedFolder.isMediaType()
&& CommonUtils.getFileNameFromPath(syncedFolder.getRemoteFolder()).startsWith(".")){
mSyncedFolderIterator.remove();
continue;
}
//If folder isn't to be scan remotly, ignore it //If folder isn't to be scan remotly, ignore it
if(!syncedFolder.isScanRemote()) continue; if(!syncedFolder.isScanRemote()) {
mSyncedFolderIterator.remove();
continue;
}
if(syncedFolder.getId() == -1) { if(syncedFolder.getId() == -1) {
//persist new syncedFolder //persist new syncedFolder
...@@ -75,6 +85,7 @@ public class ListFileRemoteOperation extends RemoteOperation { ...@@ -75,6 +85,7 @@ public class ListFileRemoteOperation extends RemoteOperation {
}else{ }else{
mSyncedFolderIterator.remove(); mSyncedFolderIterator.remove();
Log.w(TAG, "syncedFolder "+syncedFolder.getRemoteFolder()+" doesn't have a valid ID"); Log.w(TAG, "syncedFolder "+syncedFolder.getRemoteFolder()+" doesn't have a valid ID");
continue;
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment