Skip to content

Commit 8b5d7fd

Browse files
committed
handling paths with spaces.
1 parent baced2e commit 8b5d7fd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

installer/macosx/CoderSetup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ def formatSDDevice():
323323

324324
pythonexe = os.path.dirname(sys.argv[0]) + "/../MacOS/python"
325325
open( logfile, 'w' ).close()
326-
command = "osascript -e 'do shell script \"" + pythonexe + " -u formatsdcard.py really " + str( sdCardDev ) + " > " + logfile + " \" with administrator privileges'"
326+
command = "osascript -e 'do shell script \"\\\"" + pythonexe + "\\\" -u formatsdcard.py really " + str( sdCardDev ) + " > " + logfile + " \" with administrator privileges'"
327327
print( "SYSTEM: " + command )
328328
#os.system( command )
329329

installer/macosx/formatsdcard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050

5151
filesize = os.path.getsize( filepath )
5252
progresssize = 0
53-
command = 'dd bs=2m if=' + filepath + ' of=/dev/rdisk' + str( sdCardDev )
53+
command = 'dd bs=2m if="' + filepath + '" of=/dev/rdisk' + str( sdCardDev )
5454
print( "FORMATTING: " + command )
5555

5656
proc = subprocess.Popen( command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE )

0 commit comments

Comments
 (0)