diff options
author | Igor Pavlov <ipavlov@users.sourceforge.net> | 2017-04-30 03:00:00 +0300 |
---|---|---|
committer | Kornel <kornel@geekhood.net> | 2017-05-05 20:56:20 +0300 |
commit | 2efa10565ac395d2ce9a679ead46e70fb2f963eb (patch) | |
tree | 84c8df4deb69ec44ea15af9378f24347db55c357 /CPP/7zip/UI/FileManager/FSDrives.cpp | |
parent | 603abd5528c97346e9448c0ff47949f818fe558c (diff) |
17.0017.00
Diffstat (limited to 'CPP/7zip/UI/FileManager/FSDrives.cpp')
-rw-r--r-- | CPP/7zip/UI/FileManager/FSDrives.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/CPP/7zip/UI/FileManager/FSDrives.cpp b/CPP/7zip/UI/FileManager/FSDrives.cpp index dd4ba724..208cea4e 100644 --- a/CPP/7zip/UI/FileManager/FSDrives.cpp +++ b/CPP/7zip/UI/FileManager/FSDrives.cpp @@ -28,12 +28,14 @@ using namespace NWindows; using namespace NFile; using namespace NFind; -static const CFSTR kVolPrefix = FTEXT("\\\\.\\"); -static const CFSTR kSuperPrefix = FTEXT("\\\\?\\"); +static const char * const kVolPrefix = "\\\\.\\"; +static const char * const kSuperPrefix = "\\\\?\\"; FString CDriveInfo::GetDeviceFileIoName() const { - return kVolPrefix + Name; + FString f (kVolPrefix); + f += Name; + return f; } struct CPhysTempBuffer @@ -179,11 +181,10 @@ STDMETHODIMP CFSDrives::LoadItems() // we must use IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS for (unsigned n = 0; n < 16; n++) // why 16 ? { - FChar temp[16]; - ConvertUInt32ToString(n, temp); - FString name = FTEXT("PhysicalDrive"); - name += temp; - FString fullPath = kVolPrefix; + FString name ("PhysicalDrive"); + name.Add_UInt32(n); + + FString fullPath (kVolPrefix); fullPath += name; CFileInfo fi; @@ -336,7 +337,7 @@ STDMETHODIMP CFSDrives::GetSystemIconIndex(UInt32 index, Int32 *iconIndex) void CFSDrives::AddExt(FString &s, unsigned index) const { - s += FTEXT('.'); + s += '.'; const CDriveInfo &di = _drives[index]; const char *ext; if (di.DriveType == DRIVE_CDROM) @@ -347,7 +348,7 @@ void CFSDrives::AddExt(FString &s, unsigned index) const ext = "fat"; else ext = "img"; - s.AddAscii(ext); + s += ext; } HRESULT CFSDrives::GetFileSize(unsigned index, UInt64 &fileSize) const |