Skip to content
Browse files

Fix wrong dd block size notation for OS X with OS check

  • Loading branch information...
1 parent 8a1c920 commit f20bb4c3ba495501dfdab846a6b5a20ee0a32166 @tech2077 tech2077 committed Jul 14, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1
@@ -172,7 +172,10 @@ class transferInBackground (threading.Thread): #Runs the dd command in a thread
def run ( self ):
global SDsnip
global path
- copyString = 'dd bs=1M if=%s of=%s' % (path,SDsnip)
+ if OS[0] != 'Darwin':
+ copyString = 'dd bs=1M if=%s of=%s' % (path,SDsnip)
+ else
+ copyString = 'dd bs=1m if=%s of=%s' % (path,SDsnip)
print 'Running ' + copyString + '...'
print getoutput(copyString)

2 comments on commit f20bb4c

beenje commented on f20bb4c Jul 17, 2012

I think it would have been better to avoid the "m" and "M" and just use the value 1024*1024.
If you install GNU coreutils on OSX, this will break.
See the comments on 80887b0edc and my PR


This seems like a better idea

Please sign in to comment.
Something went wrong with that request. Please try again.