Explorar el Código

Fix for spaces in file names

[SVN r27564]
Misha Bergal hace 21 años
padre
commit
d81c2ef6a8
Se han modificado 1 ficheros con 7 adiciones y 5 borrados
  1. 7 5
      tools/regression/xsl_reports/utils/libxslt.py

+ 7 - 5
tools/regression/xsl_reports/utils/libxslt.py

@@ -5,10 +5,11 @@ import sys
 
 def libxslt( log, xml_file, xsl_file, output_file, parameters = None ):
 
-    if sys.platform == 'win32':
-        os.chdir( os.path.dirname( xsl_file ) )
+    ## if sys.platform == 'win32':
+    ##    os.chdir( os.path.dirname( xsl_file ) )
+
     transform_command = 'xsltproc'
-    transform_command = transform_command + ' -o ' + '%s' % output_file
+    transform_command = transform_command + ' -o ' + '%s' % output_file.replace( '\\', '/' ).replace( ' ', '%20' )
 
     if parameters is not None:
          for i in parameters:
@@ -16,7 +17,8 @@ def libxslt( log, xml_file, xsl_file, output_file, parameters = None ):
                  parameters[i] = parameters[i].replace( '\\', '/' )
                  transform_command = transform_command + ' --param %s "\'%s\'" ' % ( i, parameters[ i ] )
 
-    transform_command = transform_command + ' "%s" ' % xsl_file
-    transform_command = transform_command + ' "%s" ' % xml_file
+    transform_command = transform_command + ' "%s" ' % xsl_file.replace( '\\', '/' ).replace( ' ', '%20' )
+    transform_command = transform_command + ' "%s" ' % xml_file.replace( '\\', '/' ).replace( ' ', '%20' )
     log( transform_command )
     os.system( transform_command )    
+

粤ICP备19079148号