added downscaled as file scanning if exist. made gib to gb for calculations. changed windows detection.
This commit is contained in:
@@ -32,7 +32,7 @@ namespace LightlessSync.Utils
|
||||
{
|
||||
string rootPath;
|
||||
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && (!IsProbablyWine() || !isWine))
|
||||
if (OperatingSystem.IsWindows() && (!IsProbablyWine() || !isWine))
|
||||
{
|
||||
var info = new FileInfo(filePath);
|
||||
var dir = info.Directory ?? new DirectoryInfo(filePath);
|
||||
@@ -50,7 +50,7 @@ namespace LightlessSync.Utils
|
||||
|
||||
FilesystemType detected;
|
||||
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && (!IsProbablyWine() || !isWine))
|
||||
if (OperatingSystem.IsWindows() && (!IsProbablyWine() || !isWine))
|
||||
{
|
||||
var root = new DriveInfo(rootPath);
|
||||
var format = root.DriveFormat?.ToUpperInvariant() ?? string.Empty;
|
||||
@@ -214,7 +214,7 @@ namespace LightlessSync.Utils
|
||||
if (_blockSizeCache.TryGetValue(root, out int cached))
|
||||
return cached;
|
||||
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && !isWine)
|
||||
if (OperatingSystem.IsWindows() && !isWine)
|
||||
{
|
||||
int result = GetDiskFreeSpaceW(root,
|
||||
out uint sectorsPerCluster,
|
||||
|
||||
Reference in New Issue
Block a user