diff options
author | Ozan Türkyılmaz <ozan.turkyilmaz@gmail.com> | 2011-05-18 08:22:48 -0300 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2011-05-19 08:33:05 -0500 |
commit | 490559255d1d482287d604593e78ef9299e78775 (patch) | |
tree | 630fb8cfd311a03e9c4e856de97222f9bb09449e /misc/chm2pdf/patches | |
parent | 834e79ae023e37ca4386250a785c89622d97b89a (diff) | |
download | slackbuilds-490559255d1d482287d604593e78ef9299e78775.tar.gz |
misc/chm2pdf: Patched to fix problem with file name with spaces.
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'misc/chm2pdf/patches')
-rw-r--r-- | misc/chm2pdf/patches/filename.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/misc/chm2pdf/patches/filename.patch b/misc/chm2pdf/patches/filename.patch new file mode 100644 index 0000000000..145d5f3cb8 --- /dev/null +++ b/misc/chm2pdf/patches/filename.patch @@ -0,0 +1,41 @@ +--- a/chm2pdf 2011-01-16 10:52:29.000000000 +0100 ++++ b/chm2pdf 2011-01-16 12:41:26.541000035 +0100 +@@ -112,7 +112,7 @@ + takes the list of files inside the chm archive, with the correct urls of each one. + ''' + +- os.system('enum_chmLib '+filename+' > '+CHM2PDF_WORK_DIR+'/urlslist.txt') ++ os.system('enum_chmLib "'+filename+'" > "'+CHM2PDF_WORK_DIR+'/urlslist.txt"') + flist=open(CHM2PDF_WORK_DIR+'/urlslist.txt','rU') + urls_list=[] + for line in flist.readlines()[3:]: +@@ -378,7 +378,7 @@ + + if os.path.exists(page_filename) and (options['titlefile'] == '' or not options['titlefile'] in url): + htmlout_filename=CHM2PDF_WORK_DIR+'/temp'+'%(#)04d' %{"#":c}+'.html' +- htmlout_filename_list+=' '+ htmlout_filename ++ htmlout_filename_list+=' "'+ htmlout_filename + '"' + htmlout_filenames.append(htmlout_filename) + + if options['dontextract'] == '': +@@ -583,7 +583,7 @@ + + if options['verbose']=='--verbose' and options['verbositylevel']=='high': + print 'htmldoc' + htmldoc_opts + ' ' + htmlout_filename_list + " -f "+ outputfilename + " > /dev/null" +- exit_value=os.system ('htmldoc' + htmldoc_opts + ' ' + htmlout_filename_list + " -f "+ outputfilename + " > /dev/null") ++ exit_value=os.system ('htmldoc' + htmldoc_opts + ' ' + htmlout_filename_list + ' -f "'+ outputfilename + '" > /dev/null') + + if exit_value != 0: + print 'Something wrong happened when launching htmldoc.' +@@ -1085,9 +1085,9 @@ + print 'Will use the files in ' + CHM2PDF_ORIG_DIR + ' and ' + CHM2PDF_WORK_DIR + '.' + else: + if options['verbose'] == '--verbose' and options['verbositylevel'] == 'high': +- os.system('extract_chmLib ' + filename + ' ' + CHM2PDF_ORIG_DIR) ++ os.system('extract_chmLib "' + filename + '" "' + CHM2PDF_ORIG_DIR + '"') + else: +- os.system('extract_chmLib ' + filename + ' ' + CHM2PDF_ORIG_DIR + '&> /dev/null') ++ os.system('extract_chmLib "' + filename + '" "' + CHM2PDF_ORIG_DIR + '" &> /dev/null') + + convert_to_pdf(cfile, filename, outputfilename, options) + shutil.rmtree(CHM2PDF_TEMP_WORK_DIR) |