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
006f82a2
Commit
006f82a2
authored
Aug 20, 2019
by
vince-bourgmayer
Browse files
ignore hidden media files data from DB
parent
53c76f49
Pipeline
#20898
passed with stage
in 3 minutes and 28 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/foundation/e/drive/services/ObserverService.java
View file @
006f82a2
...
@@ -341,16 +341,23 @@ public class ObserverService extends Service implements OnRemoteOperationListene
...
@@ -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
()
)
)
{
...
@@ -628,6 +635,13 @@ public class ObserverService extends Service implements OnRemoteOperationListene
...
@@ -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é
...
...
Vincent Bourgmayer
🎼
@vincent
mentioned in commit
b1a1b558
·
Aug 20, 2019
mentioned in commit
b1a1b558
mentioned in commit b1a1b558ed164b115d12c8093533a4fca37185c4
Toggle commit list
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