Skip to content

Commit 43d9744

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

1 file changed

Lines changed: 10 additions & 16 deletions

File tree

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

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -112,23 +112,17 @@ class FileSystemRepository(private val dao: FileSystemDao, private val context:
112112
while (cursor.moveToNext()) {
113113
val filePath = cursor.getString(idxData)
114114

115-
val lastModifiedMs =
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-
}
122-
}
115+
val lastModifiedMs = if (idxModified != -1) {
116+
cursor.getLong(idxModified) * 1000
117+
} else {
118+
null
119+
}
123120

124-
val creationTimeMs =
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-
}
131-
}
121+
val creationTimeMs = if (idxAdded != -1) {
122+
cursor.getLong(idxAdded) * 1000
123+
} else {
124+
null
125+
}
132126

133127
Log_OC.d(
134128
TAG,

0 commit comments

Comments
 (0)