diff --git a/src/system/helpers.cpp b/src/system/helpers.cpp index 8fe5a56fa..29ed1a221 100644 --- a/src/system/helpers.cpp +++ b/src/system/helpers.cpp @@ -606,7 +606,9 @@ std::string getPathName(std::string &path) std::string getBaseName(std::string &path) { - return _getBaseName(path, "/"); + std::string p = path; + p = _getPathName(p, "?"); + return _getBaseName(p, "/"); } std::string getFileName(std::string &file) @@ -616,7 +618,9 @@ std::string getFileName(std::string &file) std::string getFileExt(std::string &file) { - return _getBaseName(file, "."); + std::string f = file; + f = _getPathName(f, "?"); + return _getBaseName(f, "."); }