Skip to content

Commit

Permalink
handling paths with spaces.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmstriegel committed Feb 22, 2015
1 parent baced2e commit 8b5d7fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion installer/macosx/CoderSetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def formatSDDevice():

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

Expand Down
2 changes: 1 addition & 1 deletion installer/macosx/formatsdcard.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

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

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

1 comment on commit 8b5d7fd

@femikr02
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good man

Please sign in to comment.