Skip to content

Commit ef23aa6

Browse files
authored
Merge pull request #87 from SummerGGift/fix_linux_pkg_bug
【修复】:Linux 下软件包无法删除的 bug
2 parents 6c0ba40 + c8d089c commit ef23aa6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cmds/cmd_package.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,12 @@ def get_package_remove_path(pkg, bsp_packages_path):
671671
ver = pkg['ver']
672672
if dirpath[0] == '/' or dirpath[0] == '\\':
673673
dirpath = dirpath[1:]
674-
dirpath = os.path.basename(dirpath.replace('/', '\\'))
674+
675+
if platform.system() == "Windows":
676+
dirpath = os.path.basename(dirpath.replace('/', '\\'))
677+
else:
678+
dirpath = os.path.basename(dirpath)
679+
675680
removepath = os.path.join(bsp_packages_path, dirpath)
676681

677682
# Handles the deletion of git repository folders with version Numbers

0 commit comments

Comments
 (0)