Skip to content

Commit 1913452

Browse files
norbertwgkmilos
authored andcommitted
change in recognize Mac;
tests adjusted for msys and cygwin; regex contains "Exif" for better filtering; documentation adjusted
1 parent 9515dfb commit 1913452

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/actions.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1833,10 +1833,12 @@ int renameFile(std::string& newPath, const tm* tm, Exiv2::ExifData& exifData) {
18331833
// rename using exiv2 tags
18341834
// is done after calling setting date/time: the value retrieved from tag might include something like %Y, which then
18351835
// should not be replaced by year
1836-
std::regex format_regex(":{1}?(.*?):{1}?");
1836+
std::regex format_regex(":{1}?(Exif\\..*?):{1}?");
18371837
#if defined(_WIN32)
18381838
std::string illegalChars = "\\/:*?\"<>|";
1839-
#elif defined(__APPLE__)
1839+
/* Todo: How to correctly recognize a Mac platform? */
1840+
#elif defined macintosh || defined MACOS_CLASSIC || defined MACOS_X_UNIX || defined MACOS_X || defined MACOS || \
1841+
defined(__APPLE__)
18401842
std::string illegalChars = "/:";
18411843
#else
18421844
std::string illegalChars = "/";

0 commit comments

Comments
 (0)