Skip to content
This repository has been archived by the owner on Mar 17, 2024. It is now read-only.

Commit

Permalink
Show name of drive in File Manager
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxXor committed Jul 24, 2015
1 parent 69124de commit dbac14f
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 45 deletions.
12 changes: 11 additions & 1 deletion Client/Core/Commands/SystemHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,17 @@ public static void HandleGetDrives(Packets.ServerPackets.GetDrives command, Clie
string[] rootDirectory = new string[drives.Length];
for (int i = 0; i < drives.Length; i++)
{
displayName[i] = string.Format("{0} ({1}, {2})", drives[i].RootDirectory.FullName, Helper.Helper.DriveTypeName(drives[i].DriveType), drives[i].DriveFormat);
var volumeLabel = drives[i].VolumeLabel;
if (string.IsNullOrEmpty(volumeLabel))
{
displayName[i] = string.Format("{0} [{1}, {2}]", drives[i].RootDirectory.FullName,
Helper.Helper.DriveTypeName(drives[i].DriveType), drives[i].DriveFormat);
}
else
{
displayName[i] = string.Format("{0} ({1}) [{2}, {3}]", volumeLabel, drives[i].RootDirectory.FullName,
Helper.Helper.DriveTypeName(drives[i].DriveType), drives[i].DriveFormat);
}
rootDirectory[i] = drives[i].RootDirectory.FullName;
}

Expand Down
84 changes: 42 additions & 42 deletions Server/Forms/FrmFileManager.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Server/Forms/FrmFileManager.resx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAW
Ew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on commit dbac14f

@MaxXor
Copy link
Contributor Author

@MaxXor MaxXor commented on dbac14f Jul 24, 2015

Choose a reason for hiding this comment

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

ref #262

Please sign in to comment.