Commit f3b387c0 authored by asseldonk's avatar asseldonk
Browse files

filesystem: revert paste

parent d2686946
......@@ -353,31 +353,14 @@ class FileSystem(object):
fullsrc.split(os.sep)[-1], path)
fulltarget = os.path.join(path, target)
orig_target = fullsrc.split(os.sep)[-1]
orig_fulltarget = os.path.join(path, orig_target)
if fullsrc != orig_fulltarget:
if os.path.isdir(fullsrc):
shutil.copytree(fullsrc, fulltarget)
if cut:
shutil.rmtree(fullsrc)
else:
shutil.copy2(fullsrc, fulltarget)
if cut:
os.remove(fullsrc)
if os.path.isdir(fullsrc):
shutil.copytree(fullsrc, fulltarget)
if cut:
shutil.rmtree(fullsrc)
else:
fulltarget_temp = orig_fulltarget + "~temp"
if os.path.isdir(fullsrc):
shutil.copytree(fullsrc, fulltarget_temp)
if cut:
shutil.rmtree(fullsrc)
shutil.move(fulltarget_temp, orig_fulltarget)
else:
shutil.copy2(fullsrc, fulltarget_temp)
if cut:
os.remove(fullsrc)
shutil.move(fulltarget_temp, orig_fulltarget)
shutil.copy2(fullsrc, fulltarget)
if cut:
os.remove(fullsrc)
def save_file(self, path, content, force=True, binary=False,
utf8=False, window_id=None, view_id=None, watch_id=None):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment