mirror of
				https://github.com/SimpleMobileTools/Simple-File-Manager.git
				synced 2025-06-05 22:09:15 +02:00 
			
		
		
		
	use Rename at Move if the source and destination are on the same storage
This commit is contained in:
		| @@ -15,6 +15,7 @@ import com.simplemobiletools.filemanager.asynctasks.CopyTask | ||||
| import com.simplemobiletools.filemanager.extensions.rescanItem | ||||
| import com.simplemobiletools.filemanager.extensions.toast | ||||
| import com.simplemobiletools.filepicker.dialogs.FilePickerDialog | ||||
| import com.simplemobiletools.filepicker.extensions.getBasePath | ||||
| import com.simplemobiletools.filepicker.extensions.humanizePath | ||||
| import kotlinx.android.synthetic.main.copy_item.view.* | ||||
| import java.io.File | ||||
| @@ -90,7 +91,7 @@ class CopyDialog(val activity: Activity, val files: List<File>, val copyListener | ||||
|                     CopyTask(copyListener, context).execute(pair) | ||||
|                     dismiss() | ||||
|                 } else { | ||||
|                     if (Utils.isPathOnSD(context, sourcePath) && Utils.isPathOnSD(context, destinationPath)) { | ||||
|                     if (sourcePath.getBasePath(context) == destinationPath.getBasePath(context)) { | ||||
|                         for (f in files) { | ||||
|                             val destination = File(destinationDir, f.name) | ||||
|                             f.renameTo(destination) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user