diff --git a/cpp/FileMetadataInitializer.cpp b/cpp/FileMetadataInitializer.cpp index 208304699c..5d1047ce20 100755 --- a/cpp/FileMetadataInitializer.cpp +++ b/cpp/FileMetadataInitializer.cpp @@ -66,7 +66,8 @@ void Snowflake::Client::FileMetadataInitializer::populateSrcLocUploadMetadata(st if (hFind == INVALID_HANDLE_VALUE) { DWORD dwError = GetLastError(); - if (dwError == ERROR_NO_MORE_FILES || dwError == ERROR_FILE_NOT_FOUND) + if (dwError == ERROR_NO_MORE_FILES || dwError == ERROR_FILE_NOT_FOUND || + dwError == ERROR_PATH_NOT_FOUND) { CXX_LOG_ERROR("No file matching pattern %s has been found. Error: %d", sourceLocation.c_str(), dwError); diff --git a/include/snowflake/IStatementPutGet.hpp b/include/snowflake/IStatementPutGet.hpp index 3a70d82a43..7c880130cc 100644 --- a/include/snowflake/IStatementPutGet.hpp +++ b/include/snowflake/IStatementPutGet.hpp @@ -81,12 +81,12 @@ class IStatementPutGet // from system locale. No coversion by default. virtual std::string UTF8ToPlatformString(const std::string& utf8_str) { - return utf8_str; + return std::string(utf8_str); } virtual std::string platformStringToUTF8(const std::string& platform_str) { - return platform_str; + return std::string(platform_str); } virtual ~IStatementPutGet()