chiark
/
gitweb
/
~ianmdlvl
/
cura.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc88992
)
Skip drives which do not have free space (possible CD or card reader bits without...
author
daid303
<daid303@gmail.com>
Tue, 23 Apr 2013 11:40:51 +0000
(13:40 +0200)
committer
daid303
<daid303@gmail.com>
Tue, 23 Apr 2013 11:40:51 +0000
(13:40 +0200)
Cura/util/removableStorage.py
patch
|
blob
|
history
diff --git
a/Cura/util/removableStorage.py
b/Cura/util/removableStorage.py
index 42df48e10c041815baae138df1aeb3016b2669a0..0562b74d402f50a984ff0cfc57714bfd135b0f4a 100644
(file)
--- a/
Cura/util/removableStorage.py
+++ b/
Cura/util/removableStorage.py
@@
-60,6
+60,11
@@
def getPossibleSDcardDrives():
if volumeName == '':
volumeName = 'NO NAME'
+ freeBytes = ctypes.c_longlong(0)
+ if windll.kernel32.GetDiskFreeSpaceExA(letter + ':/', ctypes.byref(freeBytes), None, None) == 0:
+ continue
+ if freeBytes.value < 1:
+ continue
drives.append(('%s (%s:)' % (volumeName, letter), letter + ':/', volumeName))
bitmask >>= 1
elif platform.system() == "Darwin":