From 879f82a987618a0263d921fde777c108ec5ca89e Mon Sep 17 00:00:00 2001 From: DannyAAM Date: Tue, 31 Oct 2023 22:35:27 +0800 Subject: [PATCH] not really necessary fix? --- MSET9_installer_script/mset9.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/MSET9_installer_script/mset9.py b/MSET9_installer_script/mset9.py index 0e4ba26..7ded25c 100644 --- a/MSET9_installer_script/mset9.py +++ b/MSET9_installer_script/mset9.py @@ -288,10 +288,8 @@ def getsize(self, path): def remove(self, path): self.fs.remove(path) def rename(self, src, dst): - srcdir = os.path.dirname(src) - srcname = os.path.basename(src) - dstdir = os.path.dirname(dst) - dstname = os.path.basename(dst) + srcdir, srcname = f"/{src}".rstrip("/").rsplit("/", 1) + dstdir, dstname = f"/{dst}".rstrip("/").rsplit("/", 1) if srcdir == dstdir and all(not EightDotThree.is_8dot3_conform(n) for n in [srcname, dstname]): # cursed rename, lfn and same folder only pdentry = self.fs._get_dir_entry(srcdir)