My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 54: Doesn't work as a symlink
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  pts...@gmail.com
Closed:  Jan 2012


 
Project Member Reported by pts...@gmail.com, Jan 19, 2012
///////
--- 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
Reported and patch sent by Oleg.
Jan 19, 2012
Project Member #2 pts...@gmail.com
Fixed in r172, using a more general patch which works on Windows as well.
Status: Fixed

Powered by Google Project Hosting