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 {
//Get CurrentSyncedFolder
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(!syncedFolder.isScanRemote()) continue;
if(!syncedFolder.isScanRemote()) {
mSyncedFolderIterator.remove();
continue;
}
if(syncedFolder.getId() == -1) {
//persist new syncedFolder
......@@ -75,6 +85,7 @@ public class ListFileRemoteOperation extends RemoteOperation {
}else{
mSyncedFolderIterator.remove();
Log.w(TAG, "syncedFolder "+syncedFolder.getRemoteFolder()+" doesn't have a valid ID");
continue;
}
}
......
Supports Markdown
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