1
0
Fork 0
forked from forks/qmk_firmware

Also check /run/media/ for uf2 drives (#17517)

This commit is contained in:
Joel Challis 2022-06-30 23:29:56 +01:00 committed by GitHub
parent e5a15f404d
commit a98f69850f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -219,6 +219,9 @@ def get_drives():
tmp = rootpath + "/" + os.environ["USER"] tmp = rootpath + "/" + os.environ["USER"]
if os.path.isdir(tmp): if os.path.isdir(tmp):
rootpath = tmp rootpath = tmp
tmp = "/run" + rootpath + "/" + os.environ["USER"]
if os.path.isdir(tmp):
rootpath = tmp
for d in os.listdir(rootpath): for d in os.listdir(rootpath):
drives.append(os.path.join(rootpath, d)) drives.append(os.path.join(rootpath, d))