Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (23 sloc) 728 Bytes
argsLen = len(args)
if argsLen==3:
args[1] = args[1][:-1] if args[1][-1]=='/' else args[1]
tmpS = folder.traverse(list(reversed(args[1].split('/'))), drive)
args[2] = args[2][:-1] if args[2][-1]=='/' else args[2]
tmpD = folder.traverse(list(reversed(args[2].split('/')[:-1])), drive)
tmpDN = args[2].split('/')[-1]
if tmpS is None:
nfd(args[1])
else:
buf = copy.deepcopy(tmpS)
if tmpD is None or isinstance(tmpD, dFile):
nfd(args[2])
else:
new = tmpD.find(tmpDN)
if isinstance(new, dFolder): tmpD = new
if not isinstance(new, dFolder) and tmpDN not in ['.','..']: buf.name = tmpDN
buf.parent = tmpD
if isinstance(new, dFile): new.remove()
tmpD.add(buf)
tmpS.remove()
else:
cnu(args[0])
Jump to Line
Something went wrong with that request. Please try again.