mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-26 22:43:57 +01:00
Fix #769946 (linux.py script crashes with an OS error 39 (directory not empty))
This commit is contained in:
parent
a65477fba2
commit
a9e1969712
1 changed files with 2 additions and 1 deletions
|
|
@ -149,7 +149,8 @@ def __init__(self, opts, info=prints, warn=None, manifest=None):
|
|||
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…
Reference in a new issue