From 67a4139928a581ced60849912186db7bb15156dc Mon Sep 17 00:00:00 2001 From: Winston Liu Date: Thu, 24 Oct 2024 11:07:48 -0700 Subject: [PATCH] Allow mounting on ReFS volumes ReFS is the underlying filesystem that dev drives use and should be supported. --- GVFS/GVFS.Platform.Windows/ProjFSFilter.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/GVFS/GVFS.Platform.Windows/ProjFSFilter.cs b/GVFS/GVFS.Platform.Windows/ProjFSFilter.cs index 7306eaefd..8575012d6 100644 --- a/GVFS/GVFS.Platform.Windows/ProjFSFilter.cs +++ b/GVFS/GVFS.Platform.Windows/ProjFSFilter.cs @@ -378,14 +378,14 @@ public bool IsSupported(string normalizedEnlistmentRootPath, out string warning, string pathRoot = Path.GetPathRoot(normalizedEnlistmentRootPath); DriveInfo rootDriveInfo = DriveInfo.GetDrives().FirstOrDefault(x => x.Name == pathRoot); - string requiredFormat = "NTFS"; + string[] requiredFormats = new[] { "NTFS", "ReFS" }; if (rootDriveInfo == null) { - warning = $"Unable to ensure that '{normalizedEnlistmentRootPath}' is an {requiredFormat} volume."; + warning = $"Unable to ensure that '{normalizedEnlistmentRootPath}' is an {string.Join(" or ", requiredFormats)} volume."; } - else if (!string.Equals(rootDriveInfo.DriveFormat, requiredFormat, StringComparison.OrdinalIgnoreCase)) + else if (!requiredFormats.Any(requiredFormat => string.Equals(rootDriveInfo.DriveFormat, requiredFormat, StringComparison.OrdinalIgnoreCase))) { - error = $"Error: Currently only {requiredFormat} volumes are supported. Ensure repo is located into an {requiredFormat} volume."; + error = $"Only {string.Join(" and ", requiredFormats)} volumes are supported. Ensure your repo is located in an {string.Join(" or ", requiredFormats)} volume."; return false; }