fixed sync errors
This commit is contained in:
parent
d442182184
commit
8a3bd1e958
|
@ -118,6 +118,11 @@ class DropboxSyncTaskRunner(context: Context, val authToken: String) : SyncTaskR
|
||||||
listResult = client.files().listFolderContinue(listResult.cursor)
|
listResult = client.files().listFolderContinue(listResult.cursor)
|
||||||
}
|
}
|
||||||
} catch (e: DbxException) {
|
} catch (e: DbxException) {
|
||||||
|
if (e is ListFolderErrorException) {
|
||||||
|
if (e.errorValue?.pathValue?.isNotFound ?: false) {
|
||||||
|
return emptyList()
|
||||||
|
}
|
||||||
|
}
|
||||||
throw IOException(e)
|
throw IOException(e)
|
||||||
}
|
}
|
||||||
return result
|
return result
|
||||||
|
|
|
@ -10,6 +10,6 @@ import java.util.*
|
||||||
fun toHexColor(@ColorInt color: Int, format: HexColorFormat = HexColorFormat.ARGB) = format.transform(color)
|
fun toHexColor(@ColorInt color: Int, format: HexColorFormat = HexColorFormat.ARGB) = format.transform(color)
|
||||||
|
|
||||||
enum class HexColorFormat(val transform: (Int) -> String) {
|
enum class HexColorFormat(val transform: (Int) -> String) {
|
||||||
ARGB({ "%08X".format(Locale.ROOT, it) }),
|
ARGB({ "#%08X".format(Locale.ROOT, it) }),
|
||||||
RGB({ "%06X".format(Locale.ROOT, 0xFFFFFF and it) })
|
RGB({ "#%06X".format(Locale.ROOT, 0xFFFFFF and it) })
|
||||||
}
|
}
|
Loading…
Reference in New Issue