diff options
Diffstat (limited to '7zip/Bundles/SFXCon/Main.cpp')
-rwxr-xr-x | 7zip/Bundles/SFXCon/Main.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/7zip/Bundles/SFXCon/Main.cpp b/7zip/Bundles/SFXCon/Main.cpp index d707a37a..12599e87 100755 --- a/7zip/Bundles/SFXCon/Main.cpp +++ b/7zip/Bundles/SFXCon/Main.cpp @@ -40,7 +40,10 @@ static const char *kCopyrightString = static const int kNumSwitches = 6; -const wchar_t *defaultExt = L".exe"; +#ifdef _WIN32 +static const wchar_t *kDefaultExt = L".exe"; +static const int kDefaultExtLength = 4; +#endif namespace NKey { enum Enum @@ -383,8 +386,10 @@ int Main2( bool yesToAll = parser[NKey::kYes].ThereIs; - if (archiveName.Right(4).CompareNoCase(defaultExt) != 0) - archiveName += defaultExt; + #ifdef _WIN32 + if (archiveName.Right(kDefaultExtLength).CompareNoCase(kDefaultExt) != 0) + archiveName += kDefaultExt; + #endif // NExtractMode::EEnum extractMode; // bool isExtractGroupCommand = command.IsFromExtractGroup(extractMode); |