Worked around a Ghostscript problem when extracting files on a network share.

master
Pacman Ghost 7 years ago
parent 6eba63909a
commit 5e175c16b3
  1. 3
      asl_cards/parse.py

@ -89,6 +89,9 @@ class PdfParser:
def parse( self , target , max_pages=-1 , image_res=None ) :
"""Extract the cards from a PDF file."""
# FUDGE! The Qt directory browser always returns paths using forward slashes, which confuses Ghostscript :-/
if sys.platform == "win32" and target.startswith("//") :
target = target.replace( "/" , "\\" )
# locate the files we're going to parse
if os.path.isfile( target ) :
fnames = [ target ]

Loading…
Cancel
Save