mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
Some linux system raise EACCESS instead of EPREM on fchown despite what the manpage says.
This commit is contained in:
parent
bc85aea160
commit
88bc38abc3
@ -43,7 +43,7 @@ def save_container(container, path):
|
|||||||
try:
|
try:
|
||||||
os.fchown(fno, st.st_uid, st.st_gid)
|
os.fchown(fno, st.st_uid, st.st_gid)
|
||||||
except EnvironmentError as err:
|
except EnvironmentError as err:
|
||||||
if err.errno != errno.EPERM:
|
if err.errno not in (errno.EPERM, errno.EACCES):
|
||||||
# ignore chown failure as user could be editing file belonging
|
# ignore chown failure as user could be editing file belonging
|
||||||
# to a different user, in which case we really cant do anything
|
# to a different user, in which case we really cant do anything
|
||||||
# about it short of making the file update non-atomic
|
# about it short of making the file update non-atomic
|
||||||
|
Loading…
x
Reference in New Issue
Block a user