Commit 006f82a2 authored by vince-bourgmayer's avatar vince-bourgmayer

ignore hidden media files data from DB

parent 53c76f49
Pipeline #20898 passed with stage
in 3 minutes and 28 seconds
......@@ -341,16 +341,23 @@ public class ObserverService extends Service implements OnRemoteOperationListene
ListIterator<SyncedFileState> syncedFileListIterator;
for( int i =-1, size = remoteFiles.size(); ++i < size; ){
syncedFileListIterator = syncedFileStates.listIterator(); //reset listiterator
boolean correspondant_found = false;
final RemoteFile remoteFile = (RemoteFile) remoteFiles.get(i);
final String remoteFilePath = remoteFile.getRemotePath();
Log.v( CURRENTTAG, "start to loop through syncedFileListIterator for: "+remoteFilePath);
// hidden file from server has already been filtered in previous step
while( syncedFileListIterator.hasNext() && !correspondant_found ){
SyncedFileState syncedFileState = syncedFileListIterator.next();
//ignore hidden file from db
if(syncedFileState.isMediaType() && syncedFileState.getName().startsWith(".")){
syncedFileListIterator.remove();
continue;
}
Log.d(CURRENTTAG, "syncedFileState.getRemotePath() :"+syncedFileState.getRemotePath() );
if( !mOperationManagerService.isSyncingFile( syncedFileState.getLocalPath() ) ) {
......@@ -628,6 +635,13 @@ public class ObserverService extends Service implements OnRemoteOperationListene
Log.v(TAG, "Loop through syncedFileState (Path, Id, last Modified):");
while( syncedFileListIterator.hasNext() && !correspondant_found ) {
SyncedFileState syncedFileState = syncedFileListIterator.next();
//Ignore hidden media file store in DB
if(syncedFileState.isMediaType() && syncedFileState.getName().startsWith(".")){
syncedFileListIterator.remove();
continue;
}
Log.v(TAG, syncedFileState.getLocalPath()+", "+syncedFileState.getId()+", "+syncedFileState.getLocalLastModified());
//Si le fichier n'est pas en train d'être synchronisé
......
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