Loading app/src/main/java/foundation/e/drive/services/ObserverService.java +15 −1 Original line number Original line Diff line number Diff line Loading @@ -341,16 +341,23 @@ public class ObserverService extends Service implements OnRemoteOperationListene ListIterator<SyncedFileState> syncedFileListIterator; ListIterator<SyncedFileState> syncedFileListIterator; for( int i =-1, size = remoteFiles.size(); ++i < size; ){ for( int i =-1, size = remoteFiles.size(); ++i < size; ){ syncedFileListIterator = syncedFileStates.listIterator(); //reset listiterator syncedFileListIterator = syncedFileStates.listIterator(); //reset listiterator boolean correspondant_found = false; boolean correspondant_found = false; final RemoteFile remoteFile = (RemoteFile) remoteFiles.get(i); final RemoteFile remoteFile = (RemoteFile) remoteFiles.get(i); final String remoteFilePath = remoteFile.getRemotePath(); final String remoteFilePath = remoteFile.getRemotePath(); Log.v( CURRENTTAG, "start to loop through syncedFileListIterator for: "+remoteFilePath); 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 ){ while( syncedFileListIterator.hasNext() && !correspondant_found ){ SyncedFileState syncedFileState = syncedFileListIterator.next(); 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() ); Log.d(CURRENTTAG, "syncedFileState.getRemotePath() :"+syncedFileState.getRemotePath() ); if( !mOperationManagerService.isSyncingFile( syncedFileState.getLocalPath() ) ) { if( !mOperationManagerService.isSyncingFile( syncedFileState.getLocalPath() ) ) { Loading Loading @@ -628,6 +635,13 @@ public class ObserverService extends Service implements OnRemoteOperationListene Log.v(TAG, "Loop through syncedFileState (Path, Id, last Modified):"); Log.v(TAG, "Loop through syncedFileState (Path, Id, last Modified):"); while( syncedFileListIterator.hasNext() && !correspondant_found ) { while( syncedFileListIterator.hasNext() && !correspondant_found ) { SyncedFileState syncedFileState = syncedFileListIterator.next(); 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()); Log.v(TAG, syncedFileState.getLocalPath()+", "+syncedFileState.getId()+", "+syncedFileState.getLocalLastModified()); //Si le fichier n'est pas en train d'être synchronisé //Si le fichier n'est pas en train d'être synchronisé Loading Loading
app/src/main/java/foundation/e/drive/services/ObserverService.java +15 −1 Original line number Original line Diff line number Diff line Loading @@ -341,16 +341,23 @@ public class ObserverService extends Service implements OnRemoteOperationListene ListIterator<SyncedFileState> syncedFileListIterator; ListIterator<SyncedFileState> syncedFileListIterator; for( int i =-1, size = remoteFiles.size(); ++i < size; ){ for( int i =-1, size = remoteFiles.size(); ++i < size; ){ syncedFileListIterator = syncedFileStates.listIterator(); //reset listiterator syncedFileListIterator = syncedFileStates.listIterator(); //reset listiterator boolean correspondant_found = false; boolean correspondant_found = false; final RemoteFile remoteFile = (RemoteFile) remoteFiles.get(i); final RemoteFile remoteFile = (RemoteFile) remoteFiles.get(i); final String remoteFilePath = remoteFile.getRemotePath(); final String remoteFilePath = remoteFile.getRemotePath(); Log.v( CURRENTTAG, "start to loop through syncedFileListIterator for: "+remoteFilePath); 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 ){ while( syncedFileListIterator.hasNext() && !correspondant_found ){ SyncedFileState syncedFileState = syncedFileListIterator.next(); 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() ); Log.d(CURRENTTAG, "syncedFileState.getRemotePath() :"+syncedFileState.getRemotePath() ); if( !mOperationManagerService.isSyncingFile( syncedFileState.getLocalPath() ) ) { if( !mOperationManagerService.isSyncingFile( syncedFileState.getLocalPath() ) ) { Loading Loading @@ -628,6 +635,13 @@ public class ObserverService extends Service implements OnRemoteOperationListene Log.v(TAG, "Loop through syncedFileState (Path, Id, last Modified):"); Log.v(TAG, "Loop through syncedFileState (Path, Id, last Modified):"); while( syncedFileListIterator.hasNext() && !correspondant_found ) { while( syncedFileListIterator.hasNext() && !correspondant_found ) { SyncedFileState syncedFileState = syncedFileListIterator.next(); 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()); Log.v(TAG, syncedFileState.getLocalPath()+", "+syncedFileState.getId()+", "+syncedFileState.getLocalLastModified()); //Si le fichier n'est pas en train d'être synchronisé //Si le fichier n'est pas en train d'être synchronisé Loading