| 1947 | } |
| 1948 | |
| 1949 | std::string newFilePath(const std::string& path, const std::string& ext) { |
| 1950 | auto p = fs::path(path); |
| 1951 | auto directory = fs::path(Params::instance().directory_); |
| 1952 | if (directory.empty()) |
| 1953 | directory = p.parent_path(); |
| 1954 | if (Exiv2::fileProtocol(path) != Exiv2::pFile) |
| 1955 | directory.clear(); // use current directory for remote files |
| 1956 | return (directory / (p.stem().string() + ext)).string(); |
| 1957 | } |
| 1958 | |
| 1959 | int dontOverwrite(const std::string& path) { |
| 1960 | if (path == "-") |
no test coverage detected