delete files after Move only if they were copied successfully

This commit is contained in:
tibbi 2017-05-28 23:46:26 +02:00
parent 3c72e17ec5
commit ad819c856a
2 changed files with 2 additions and 2 deletions

View file

@ -29,5 +29,5 @@ ext {
propMinSdkVersion = 16
propTargetSdkVersion = propCompileSdkVersion
propVersionCode = 1
propVersionName = '2.18.6'
propVersionName = '2.18.7'
}

View file

@ -108,7 +108,7 @@ class CopyMoveTask(val activity: BaseSimpleActivity, val copyOnly: Boolean = fal
inputStream.copyTo(out!!)
activity.scanFile(destination) {}
if (destination.length() > 0)
if (source.hashCode() == destination.hashCode())
mMovedFiles.add(source)
}