Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
e
os
eDrive
Commits
b1a1b558
Commit
b1a1b558
authored
Aug 20, 2019
by
vince-bourgmayer
Browse files
cherry pick
006f82a2
parent
8cf12f0c
Pipeline
#20904
passed with stage
in 1 minute and 53 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
app/src/main/java/foundation/e/drive/services/ObserverService.java
View file @
b1a1b558
...
...
@@ -330,16 +330,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
(
TAG
,
"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
(
TAG
,
"syncedFileState.getRemotePath() :"
+
syncedFileState
.
getRemotePath
()
);
if
(
!
mOperationManagerService
.
isSyncingFile
(
syncedFileState
.
getLocalPath
()
)
)
{
...
...
@@ -513,8 +520,6 @@ public class ObserverService extends Service implements OnRemoteOperationListene
while
(
iterator
.
hasNext
()
){
SyncedFolder
syncedFolder
=
iterator
.
next
();
Log
.
v
(
TAG
,
"SyncedFolder :"
+
syncedFolder
.
getLibelle
()+
", "
+
syncedFolder
.
getLocalFolder
()+
", "
+
syncedFolder
.
getLastModified
()+
", "
+
syncedFolder
.
isScanLocal
()+
", "
+
syncedFolder
.
getId
()
);
if
(
syncedFolder
.
isMediaType
()
&&
CommonUtils
.
getFileNameFromPath
(
syncedFolder
.
getLocalFolder
()).
startsWith
(
"."
)){
...
...
@@ -624,6 +629,13 @@ public class ObserverService extends Service implements OnRemoteOperationListene
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é
if
(
mBoundToOperationManager
&&
!
mOperationManagerService
.
isSyncingFile
(
syncedFileState
.
getLocalPath
()
)
){
//le fichier n'est pas actuellement en train d'être chargé
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment