Show More
@@ -302,18 +302,13 b' def checklink(path):' | |||
|
302 | 302 | try: |
|
303 | 303 | fullpath = os.path.join(cachedir, target) |
|
304 | 304 | open(fullpath, b'w').close() |
|
305 |
except |
|
|
306 | # pytype: disable=unsupported-operands | |
|
307 | if inst[0] == errno.EACCES: | |
|
308 | # pytype: enable=unsupported-operands | |
|
309 | ||
|
310 | # If we can't write to cachedir, just pretend | |
|
311 | # that the fs is readonly and by association | |
|
312 | # that the fs won't support symlinks. This | |
|
313 | # seems like the least dangerous way to avoid | |
|
314 | # data loss. | |
|
315 | return False | |
|
316 | raise | |
|
305 | except PermissionError: | |
|
306 | # If we can't write to cachedir, just pretend | |
|
307 | # that the fs is readonly and by association | |
|
308 | # that the fs won't support symlinks. This | |
|
309 | # seems like the least dangerous way to avoid | |
|
310 | # data loss. | |
|
311 | return False | |
|
317 | 312 | try: |
|
318 | 313 | os.symlink(target, name) |
|
319 | 314 | if cachedir is None: |
General Comments 0
You need to be logged in to leave comments.
Login now