From ccb462869f4b0edff1fca198c64030e885220563 Mon Sep 17 00:00:00 2001 From: Robin Mills Date: Wed, 26 Aug 2015 13:34:55 +0000 Subject: [PATCH] Fix: #1100 --- src/actions.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/actions.cpp b/src/actions.cpp index 45687647..464c4bc1 100644 --- a/src/actions.cpp +++ b/src/actions.cpp @@ -2025,9 +2025,11 @@ namespace { { std::string directory = Params::instance().directory_; if (directory.empty()) directory = Util::dirname(path); - std::string newPath = directory + EXV_SEPARATOR_STR - + Util::basename(path, true) + ext; - return newPath; + directory = Exiv2::fileProtocol(path) == Exiv2::pFile + ? directory + EXV_SEPARATOR_STR + : "" // use current directory for remote files + ; + return directory + Util::basename(path, true) + ext; } int dontOverwrite(const std::string& path)