Commit 95579189 authored by vince-bourgmayer's avatar vince-bourgmayer
Browse files

When scanning remote check if subfile (and folder) of a 'media' folder are hidden files

parent 10706c2b
Pipeline #20764 passed with stage
in 2 minutes and 36 seconds
......@@ -21,6 +21,8 @@ import java.util.List;
import java.util.ListIterator;
import foundation.e.drive.database.DbHelper;
import foundation.e.drive.models.SyncedFolder;
import foundation.e.drive.utils.CommonUtils;
import static org.apache.jackrabbit.webdav.DavConstants.DEPTH_1;
/**
......@@ -88,6 +90,12 @@ public class ListFileRemoteOperation extends RemoteOperation {
for (int i = -1, remoteFilesSize = remoteFiles.size(); ++i < remoteFilesSize; ){
RemoteFile remoteFile = (RemoteFile) remoteFiles.get(i);
//if remoteFile is in a "media" folder and its name start with "."
// then ignore it
if(syncedFolder.isMediaType()
&& CommonUtils.getFileNameFromPath( remoteFile.getRemotePath() ).startsWith(".") ){
continue;
}
if( remoteFile.getMimeType().equals("DIR") ) {
String suffixPath = remoteFile.getRemotePath().substring( syncedFolder.getRemoteFolder().length() );
......@@ -147,7 +155,7 @@ public class ListFileRemoteOperation extends RemoteOperation {
Log.v(TAG, "end of run()");
return finalResult;
}
/**
*
* @return list of syncedFolder
......
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