From 49ec0b565204afd3063148106b036ac38e31ee2b Mon Sep 17 00:00:00 2001 From: kelson42 Date: Mon, 15 Oct 2012 17:53:18 +0000 Subject: [PATCH] + small fix for better support of Windows --- src/common/kiwix/library.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/common/kiwix/library.cpp b/src/common/kiwix/library.cpp index 389a5bd33..5a727cbb1 100644 --- a/src/common/kiwix/library.cpp +++ b/src/common/kiwix/library.cpp @@ -63,7 +63,13 @@ namespace kiwix { std::string id = path; if (!id.empty()) { kiwix::removeAccents(id); + +#ifdef _WIN32 + id = replaceRegex(id, "", "^.*\\\\"); +#else id = replaceRegex(id, "", "^.*/"); +#endif + id = replaceRegex(id, "", "\\.zim[a-z]*$"); id = replaceRegex(id, "_", " "); id = replaceRegex(id, "plus", "\\+");