Commit 6de07962 authored by vince-bourgmayer's avatar vince-bourgmayer
Browse files

Disable synchronisation of new locale hidden files & folders

parent 95579189
Pipeline #20766 passed with stage
in 2 minutes and 35 seconds
......@@ -23,8 +23,8 @@ public class FileFilterFactory {
case "Applications":
filter = new AppSettingsFileFilter();
break;
case "Images":
filter = new ImagesFileFilter();
case "media":
filter = new MediaFileFilter();
break;
default:
filter = new NoCacheFileFilter();
......
......@@ -10,12 +10,17 @@ package foundation.e.drive.fileFilters;
import java.io.File;
import java.io.FileFilter;
import foundation.e.drive.utils.CommonUtils;
/**
* @author Vincent Bourgmayer
*/
class ImagesFileFilter implements FileFilter {
class MediaFileFilter implements FileFilter {
@Override
public boolean accept(File file) {
return !file.isDirectory() || !file.getName().equals( ".thumbnails" );
//Return true if it's not a hidden file
return !file.isHidden();
}
}
......@@ -551,7 +551,7 @@ public class ObserverService extends Service implements OnRemoteOperationListene
folderIdList.add( (long) syncedFolder.getId() );
}
final FileFilter filter = FileFilterFactory.getFileFilter( syncedFolder.getLibelle() );
final FileFilter filter = FileFilterFactory.getFileFilter( (syncedFolder.isMediaType()) ? "media" : syncedFolder.getLibelle() );
File[] subElements = folder.listFiles(filter);
Log.v(TAG, "loop through subfiles");
for (int i = -1, subEltSize = (subElements != null)? subElements.length: 0; ++i < subEltSize; ) {
......
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