diff options
author | hut <hut@lepus.uberspace.de> | 2015-07-14 01:50:50 +0200 |
---|---|---|
committer | hut <hut@lepus.uberspace.de> | 2015-07-14 01:50:50 +0200 |
commit | 738385757680d17a33557a5ff8779cb7314097b2 (patch) | |
tree | ee11903bb5202cf642f4ff56d73164a72d34059e | |
parent | b428c6ba320461accc09d10cd65edad69c7ce9d1 (diff) | |
parent | 2922f61c1c02803c82e725469764ecd3471ee7a6 (diff) | |
download | ranger-738385757680d17a33557a5ff8779cb7314097b2.tar.gz |
Merge branch 'bookmarks_fix' of https://github.com/igoyak/ranger
-rw-r--r-- | ranger/container/bookmarks.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ranger/container/bookmarks.py b/ranger/container/bookmarks.py index 5f163e89..cbb95864 100644 --- a/ranger/container/bookmarks.py +++ b/ranger/container/bookmarks.py @@ -156,6 +156,12 @@ class Bookmarks(object): pass f.close() + old_perms = os.stat(self.path) + try: + os.chown(self.path+".new", old_perms.st_uid, old_perms.st_gid) + os.chmod(self.path+".new", old_perms.st_mode) + except OSError: + pass os.rename(self.path+".new", self.path) self._update_mtime() |