mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-08 04:07:02 -06:00
9.34
This commit is contained in:
committed by
Kornel Lesiński
parent
83f8ddcc5b
commit
f08f4dcc3c
6
CPP/7zip/UI/Common/DefaultName.cpp
Executable file → Normal file
6
CPP/7zip/UI/Common/DefaultName.cpp
Executable file → Normal file
@@ -7,13 +7,13 @@
|
||||
static UString GetDefaultName3(const UString &fileName,
|
||||
const UString &extension, const UString &addSubExtension)
|
||||
{
|
||||
int extLength = extension.Length();
|
||||
int fileNameLength = fileName.Length();
|
||||
int extLength = extension.Len();
|
||||
int fileNameLength = fileName.Len();
|
||||
if (fileNameLength > extLength + 1)
|
||||
{
|
||||
int dotPos = fileNameLength - (extLength + 1);
|
||||
if (fileName[dotPos] == '.')
|
||||
if (extension.CompareNoCase(fileName.Mid(dotPos + 1)) == 0)
|
||||
if (extension.IsEqualToNoCase(fileName.Ptr(dotPos + 1)))
|
||||
return fileName.Left(dotPos) + addSubExtension;
|
||||
}
|
||||
int dotPos = fileName.ReverseFind(L'.');
|
||||
|
||||
Reference in New Issue
Block a user