Fix unfinished files being considered downloaded
This commit is contained in:
1 parent
5c06a69c8a
commit
6e0d77a8ab
4 files changed
+29
-7
No files matched your search
@@ -26,7 +26,12 @@ class AndroidFileSystem(context: Context) : FileSystem() {
|
||||
}
|
||||
|
||||
override fun atomicMove(source: Path, target: Path) {
|
||||
TODO("Not yet implemented")
|
||||
if (source.isPhysicalFile()) {
|
||||
return physicalFileSystem.atomicMove(source, target)
|
||||
}
|
||||
|
||||
DocumentsContract.renameDocument(contentResolver, source.toUri(), target.name)
|
||||
?: throw IOException("Failed to move $source to $target")
|
||||
}
|
||||
|
||||
override fun canonicalize(path: Path): Path {
|
||||
|
||||
Reference in new issue
Block a user