🔨 Fix Windows/ReARM upload (#27872)
This commit is contained in:
parent
d76c8c1fbd
commit
4f93f31af0
1 changed files with 13 additions and 6 deletions
|
|
@ -54,18 +54,25 @@ if pioutil.is_pio_build():
|
|||
final_drive_name = drive + ':'
|
||||
# print ('disc check: {}'.format(final_drive_name))
|
||||
try:
|
||||
volume_info = str(subprocess.check_output('cmd /C dir ' + final_drive_name, stderr=subprocess.STDOUT))
|
||||
volume_info = str(subprocess.check_output('cmd /C vol ' + final_drive_name, stderr=subprocess.STDOUT))
|
||||
except Exception as e:
|
||||
print ('error:{}'.format(e))
|
||||
continue
|
||||
else:
|
||||
if target_drive in volume_info and not target_file_found: # set upload if not found target file yet
|
||||
target_drive_found = True
|
||||
if target_drive in volume_info: # set upload
|
||||
upload_disk = PureWindowsPath(final_drive_name)
|
||||
if target_filename in volume_info:
|
||||
if not target_file_found:
|
||||
target_drive_found = True
|
||||
break
|
||||
try:
|
||||
dir_info = str(subprocess.check_output('cmd /C dir ' + final_drive_name, stderr=subprocess.STDOUT))
|
||||
except Exception as e:
|
||||
print ('error:{}'.format(e))
|
||||
continue
|
||||
else:
|
||||
if target_filename in dir_info:
|
||||
upload_disk = PureWindowsPath(final_drive_name)
|
||||
target_file_found = True
|
||||
target_file_found = True
|
||||
break
|
||||
|
||||
elif current_OS == 'Linux':
|
||||
#
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue