-
-
Notifications
You must be signed in to change notification settings - Fork 386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] If drive mounted as folder, it checks root drive size instead of mounted folder size #573
Comments
无法自动识别剩余空间,停止该目录绘图。 |
I unfortunately have no time on my hands to submit a PR (maybe I will later), but I too encountered this bug and have a pretty reasonable workaround. It only applies to windows, and requires powershell be installed. If it fails to detect system drives properly using powershell, it silently falls back to the existing method. The bug is caused by the call to In def get_system_drives():
drives = []
if is_windows():
# psutil has an open bug where it doesn't properly find mountpoints for drives mounted to folders but not letters
# https://github.com/giampaolo/psutil/issues/1598
p = subprocess.run(
['powershell', '-command', 'Get-WmiObject Win32_Volume | Format-Table Name'],
capture_output=True)
if p.returncode == 0:
# Output first lines are "Name" and "----", then real list of drives
drives = [path.decode('utf-8') for path in p.stdout.split()[2:]]
return drives
for disk in psutil.disk_partitions(all=True):
drive = disk.mountpoint
if is_windows():
drive = os.path.splitdrive(drive)[0]
drives.append(drive)
drives.sort(reverse=True)
return drives This patch has fixed the issue on my machine. It's also worth noting this issue is more than just a reporting bug - if you have |
The other problem with this is it just says Dest C:\ , which mounted folder is the plot going to. I have no way of knowing which plot is going where. It has actually made this awesome program almost useless. 10 plots running and no idea without opening the log files where they are going, which has lead to multiple mishaps. cheers Lee |
I have lots of hard drives connected to my PC, thus I prefer having them mounted to folder rather than drive letters.
My DEST mounting structure is similar to:
C:/MountedPoints/1TB_HDD_No1
C:/MountedPoints/1TB_HDD_No2
C:/MountedPoints/1TB_HDD_No3
C:/MountedPoints/1TB_HDD_No4
...
My PLOTTER mounting structure is similar to:
C:/MountedPoints/PLOTTER1
C:/MountedPoints/PLOTTER2
...
In the manager.py view it shows the sizes similar to:
plotter: C: 300GB
plotter: C: 300GB
dest: C: 300GB
The text was updated successfully, but these errors were encountered: