diff options
author | VG <vg@devys.org> | 2016-12-09 11:10:13 +0100 |
---|---|---|
committer | VG <vg@devys.org> | 2016-12-09 11:10:13 +0100 |
commit | a67983a2b100c811cbecd8cdef71277ce4549889 (patch) | |
tree | ef0a7250b657fce2d2cfd6a9286bab3a24222994 | |
parent | c7a845d942c25e3e88d8c60afd17b9cab071e510 (diff) | |
download | clip-a67983a2b100c811cbecd8cdef71277ce4549889.tar.gz clip-a67983a2b100c811cbecd8cdef71277ce4549889.tar.bz2 clip-a67983a2b100c811cbecd8cdef71277ce4549889.zip |
be more clear about symlink error
-rwxr-xr-x | clip | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -38,6 +38,8 @@ def fileno(filelike): @contextlib.contextmanager def secure_open(path, mode='r', *l, **kw): + if os.path.islink(path): + raise SecurityError("The clipboard file can not be a symlink") real_mode = mode if 'w' in real_mode: real_mode = real_mode.replace('w', 'a') |