Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Common/Wildcard.cpp')
-rwxr-xr-xCommon/Wildcard.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/Common/Wildcard.cpp b/Common/Wildcard.cpp
index 1923a339..c9fd73f2 100755
--- a/Common/Wildcard.cpp
+++ b/Common/Wildcard.cpp
@@ -8,7 +8,9 @@ static const wchar_t kPeriodChar = L'.';
static const wchar_t kAnyCharsChar = L'*';
static const wchar_t kAnyCharChar = L'?';
+#ifdef _WIN32
static const wchar_t kDirDelimiter1 = L'\\';
+#endif
static const wchar_t kDirDelimiter2 = L'/';
static const UString kWildCardCharSet = L"?*";
@@ -23,7 +25,11 @@ static const UString kIllegalFileNameChars = kIllegalWildCardFileNameChars +
static inline bool IsCharDirLimiter(wchar_t c)
{
- return (c == kDirDelimiter1 || c == kDirDelimiter2);
+ return (
+ #ifdef _WIN32
+ c == kDirDelimiter1 ||
+ #endif
+ c == kDirDelimiter2);
}
// -----------------------------------------
@@ -408,7 +414,7 @@ void CCensor::AddItem(bool include, const UString &path, bool recursive)
if (DoesNameContainWildCard(front))
break;
prefix += front;
- prefix += L'\\';
+ prefix += WCHAR_PATH_SEPARATOR;
pathParts.Delete(0);
}
int index = FindPrefix(prefix);