[nostalgia/scripts/pybb] Remove permission manipulation from rm

This commit is contained in:
Gary Talent 2021-02-20 20:56:31 -06:00
parent 127e3f6df0
commit 64b9b6071e

View File

@ -11,10 +11,8 @@ def mkdir(path):
def rm(path): def rm(path):
if (os.path.exists(path) or os.path.islink(path)) and not os.path.isdir(path): if (os.path.exists(path) or os.path.islink(path)) and not os.path.isdir(path):
os.chmod(path, stat.S_IWRITE)
os.remove(path) os.remove(path)
elif os.path.isdir(path): elif os.path.isdir(path):
os.chmod(path, stat.S_IWRITE)
shutil.rmtree(path) shutil.rmtree(path)
if sys.argv[1] == 'mkdir': if sys.argv[1] == 'mkdir':