mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Fix potential bug with filesystem space checker
This commit is contained in:
parent
ec418261ea
commit
c6c722e733
@ -11,9 +11,10 @@ namespace Bloxstrap.Utility
|
||||
{
|
||||
internal static long GetFreeDiskSpace(string path)
|
||||
{
|
||||
foreach (DriveInfo drive in DriveInfo.GetDrives())
|
||||
foreach (var drive in DriveInfo.GetDrives())
|
||||
{
|
||||
if (path.StartsWith(drive.Name))
|
||||
// https://github.com/pizzaboxer/bloxstrap/issues/1648#issuecomment-2192571030
|
||||
if (path.ToUpperInvariant().StartsWith(drive.Name))
|
||||
return drive.AvailableFreeSpace;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user