Skip to content

Conversation

cryolithic
Copy link

Made disk space check more reliable.
No need to iterate each device and compare. Should be able to get directly from path.

Made disk space check more reliable.
lokzz added a commit to lokzz/bloxstrap that referenced this pull request Dec 30, 2024
catch (ArgumentException e)
{
App.Logger.WriteLine("Filesystem::BadPath", $"The path: {p} does not contain a valid drive info.");
return -1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing ;, code won't compile.

if (path.ToUpperInvariant().StartsWith(drive.Name))
return drive.AvailableFreeSpace;
var isUri = Uri.TryCreate(p, UriKind.RelativeOrAbsolute, out var u);
if (!Path.IsPathRooted(p) || !Path.IsPathFullyQualified(p) || (isUri && (u?.IsUnc??false)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird indentation here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants