public static string GetAffectedVolume(this VssWMFileDescriptor fileDesc, IUIHost host) { string expandedPath = AppendBackslash(Environment.ExpandEnvironmentVariables(fileDesc.Path)); try { return(Volumes.GetUniqueVolumeNameForPath(host, expandedPath, true)); } catch { return(expandedPath); } }