diff options
Diffstat (limited to 'src/libs/7zip/unix/CPP/7zip/Common/FilePathAutoRename.cpp')
-rw-r--r-- | src/libs/7zip/unix/CPP/7zip/Common/FilePathAutoRename.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/libs/7zip/unix/CPP/7zip/Common/FilePathAutoRename.cpp b/src/libs/7zip/unix/CPP/7zip/Common/FilePathAutoRename.cpp index 7d6e36f14..958360fac 100644 --- a/src/libs/7zip/unix/CPP/7zip/Common/FilePathAutoRename.cpp +++ b/src/libs/7zip/unix/CPP/7zip/Common/FilePathAutoRename.cpp @@ -2,19 +2,19 @@ #include "StdAfx.h" -#include "Common/Defs.h" -#include "Common/IntToString.h" +#include "../../Common/Defs.h" +#include "../../Common/IntToString.h" -#include "Windows/FileFind.h" +#include "../../Windows/FileFind.h" #include "FilePathAutoRename.h" using namespace NWindows; -static bool MakeAutoName(const UString &name, - const UString &extension, unsigned value, UString &path) +static bool MakeAutoName(const FString &name, + const FString &extension, unsigned value, FString &path) { - wchar_t number[16]; + FChar number[16]; ConvertUInt32ToString(value, number); path = name; path += number; @@ -22,22 +22,22 @@ static bool MakeAutoName(const UString &name, return NFile::NFind::DoesFileOrDirExist(path); } -bool AutoRenamePath(UString &fullProcessedPath) +bool AutoRenamePath(FString &fullProcessedPath) { - UString path; - int dotPos = fullProcessedPath.ReverseFind(L'.'); + FString path; + int dotPos = fullProcessedPath.ReverseFind(FTEXT('.')); - int slashPos = fullProcessedPath.ReverseFind(L'/'); + int slashPos = fullProcessedPath.ReverseFind(FTEXT('/')); #ifdef _WIN32 - int slash1Pos = fullProcessedPath.ReverseFind(L'\\'); + int slash1Pos = fullProcessedPath.ReverseFind(FTEXT('\\')); slashPos = MyMax(slashPos, slash1Pos); #endif - UString name, extension; + FString name, extension; if (dotPos > slashPos && dotPos > 0) { - name = fullProcessedPath.Left(dotPos); - extension = fullProcessedPath.Mid(dotPos); + name.SetFrom(fullProcessedPath, dotPos); + extension = fullProcessedPath.Ptr(dotPos); } else name = fullProcessedPath; |