diff options
author | hut <hut@lepus.uberspace.de> | 2015-02-06 23:32:10 +0100 |
---|---|---|
committer | hut <hut@lepus.uberspace.de> | 2015-02-06 23:32:50 +0100 |
commit | 32c5e03322894e3fcd990d9ba6f4365b30aadc4f (patch) | |
tree | 37eecec3e9a906801aedf50466d355d20d422adc | |
parent | 9495f9779c0604996cead68f2e083dbea4928b3c (diff) | |
download | ranger-32c5e03322894e3fcd990d9ba6f4365b30aadc4f.tar.gz |
ext.shutil_generatorized: don't follow links in copystat
This avoids error messages when copying broken links, and seems like a sane setting overall. Especially considering that ranger has no option to follow links when copying.
-rw-r--r-- | ranger/ext/shutil_generatorized.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ranger/ext/shutil_generatorized.py b/ranger/ext/shutil_generatorized.py index 2df04926..b20d5cef 100644 --- a/ranger/ext/shutil_generatorized.py +++ b/ranger/ext/shutil_generatorized.py @@ -79,7 +79,7 @@ def copyfile(src, dst): def copystat(src, dst): """Copy all stat info (mode bits, atime, mtime, flags) from src to dst""" - st = os.stat(src) + st = os.lstat(src) mode = stat.S_IMODE(st.st_mode) if hasattr(os, 'utime'): try: os.utime(dst, (st.st_atime, st.st_mtime)) |