diff --git a/src/CrestApiFs.cxx b/src/CrestApiFs.cxx index e0146068800a8273ac359aa6836a2412e00ade9d..593cac604af02265066666da88ec97d9df69687c 100644 --- a/src/CrestApiFs.cxx +++ b/src/CrestApiFs.cxx @@ -34,6 +34,10 @@ namespace Crest CrestFsClient::CrestFsClient(bool rewriteIfExists, const std::string &root_folder) : m_root_folder(root_folder), m_isRewrite(rewriteIfExists) { + if (m_root_folder == "") { + m_root_folder = std::filesystem::current_path(); + m_root_folder += "/crest"; + } if (!std::filesystem::exists(std::filesystem::path(m_root_folder))) { std::filesystem::create_directory(std::filesystem::path(m_root_folder));