diff --git a/src/patch.cpp b/src/patch.cpp index f8eb463d..3cfa849b 100644 --- a/src/patch.cpp +++ b/src/patch.cpp @@ -138,8 +138,9 @@ void PatchManager::saveAsDialog() { std::free(pathC); }); + // Append .vcv extension if no extension was given. std::string pathStr = pathC; - if (string::filenameExtension(pathStr).empty()) { + if (string::filenameExtension(string::filename(pathStr)) == "") { pathStr += ".vcv"; } diff --git a/src/plugin.cpp b/src/plugin.cpp index ed6ec303..a307ba96 100644 --- a/src/plugin.cpp +++ b/src/plugin.cpp @@ -247,7 +247,7 @@ static void extractPackages(std::string path) { std::string message; for (std::string packagePath : system::getEntries(path)) { - if (string::filenameExtension(packagePath) != "zip") + if (string::filenameExtension(string::filename(packagePath)) != "zip") continue; INFO("Extracting package %s", packagePath.c_str()); // Extract package