| Issue 54: | Doesn't work as a symlink | |
| 1 person starred this issue and may be notified of changes. | Back to list |
///////
--- pdfsizeopt.py 2012/01/19 11:13:50 1.3
+++ pdfsizeopt.py 2012/01/19 12:05:37
@@ -6855,7 +6855,10 @@
os.path.basename(__file__), rev or 'UNKNOWN', size)
# Find image converters in script dir first.
- script_dir = os.path.dirname(os.path.abspath(__file__))
+ if os.path.islink(__file__):
+ script_dir = os.path.dirname(os.path.abspath(os.readlink(__file__)))
+ else:
+ script_dir = os.path.dirname(os.path.abspath(__file__))
os.environ['PATH'] = '%s%s%s' % (
script_dir, os.pathsep, os.getenv('PATH', ''))
if (not os.getenv('PDFSIZEOPT_GS', '') and
///////
This allows to run pdfsizeopt.py through a symbolic link.
Jan 19, 2012
Project Member
#1
pts...@gmail.com
Jan 19, 2012
Fixed in r172, using a more general patch which works on Windows as well.
Status:
Fixed
|