mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #769946 (linux.py script crashes with an OS error 39 (directory not empty))
This commit is contained in:
parent
a65477fba2
commit
a9e1969712
@ -149,7 +149,8 @@ class PostInstall:
|
||||
if islinux or isfreebsd:
|
||||
for f in os.listdir('.'):
|
||||
if os.stat(f).st_uid == 0:
|
||||
os.rmdir(f) if os.path.isdir(f) else os.unlink(f)
|
||||
import shutil
|
||||
shutil.rmtree(f) if os.path.isdir(f) else os.unlink(f)
|
||||
if os.stat(config_dir).st_uid == 0:
|
||||
os.rmdir(config_dir)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user