Fixing folder move/rename
This commit is contained in:
parent
a3e1cf8a37
commit
3eebf34106
@ -51,7 +51,7 @@ class FileHandler:
|
||||
def move_file(self, fFile, tFile):
|
||||
try:
|
||||
print(f"Moving: {fFile} --> {tFile}")
|
||||
if os.path.exists(fFile) and os.path.exists(tFile):
|
||||
if os.path.exists(fFile) and not os.path.exists(tFile):
|
||||
if not tFile.endswith("/"):
|
||||
tFile += "/"
|
||||
|
||||
|
@ -287,14 +287,12 @@ class WidgetFileActionMixin:
|
||||
wid, tid = self.window_controller.get_active_data()
|
||||
view = self.get_fm_window(wid).get_view_by_id(tid)
|
||||
fPath = file.get_path()
|
||||
tPath = None
|
||||
tPath = target.get_path()
|
||||
state = True
|
||||
|
||||
if action == "copy":
|
||||
tPath = target.get_path()
|
||||
view.copy_file(fPath, tPath)
|
||||
if action == "move" or action == "rename":
|
||||
tPath = target.get_parent().get_path()
|
||||
view.move_file(fPath, tPath)
|
||||
else:
|
||||
if action == "copy":
|
||||
|
Loading…
Reference in New Issue
Block a user