Skip to content

Commit c04bfc5

Browse files
committed
obey folder configuration
Signed-off-by: alperozturk <alper_ozturk@proton.me>
1 parent 1c0ee04 commit c04bfc5

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

app/src/main/java/com/nextcloud/client/jobs/autoUpload/FileSystemRepository.kt

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,21 @@ class FileSystemRepository(private val dao: FileSystemDao, private val context:
113113
val filePath = cursor.getString(idxData)
114114

115115
val lastModifiedMs =
116-
if (idxModified != -1) cursor.getLong(idxModified) * 1000
117-
else File(filePath).lastModified().also {
118-
Log_OC.w(TAG, "DATE_MODIFIED missing, fallback to File.lastModified() for $filePath")
116+
if (idxModified != -1) {
117+
cursor.getLong(idxModified) * 1000
118+
} else {
119+
File(filePath).lastModified().also {
120+
Log_OC.w(TAG, "DATE_MODIFIED missing, fallback to File.lastModified() for $filePath")
121+
}
119122
}
120123

121124
val creationTimeMs =
122-
if (idxAdded != -1) cursor.getLong(idxAdded) * 1000
123-
else null.also {
124-
Log_OC.w(TAG, "DATE_ADDED missing, creationTime=null for $filePath")
125+
if (idxAdded != -1) {
126+
cursor.getLong(idxAdded) * 1000
127+
} else {
128+
null.also {
129+
Log_OC.w(TAG, "DATE_ADDED missing, creationTime=null for $filePath")
130+
}
125131
}
126132

127133
Log_OC.d(

0 commit comments

Comments
 (0)