diff --git a/mcopy.cpp b/mcopy.cpp index 48610c9..74d2c89 100644 --- a/mcopy.cpp +++ b/mcopy.cpp @@ -127,7 +127,9 @@ void getMetadataFromFile(std::string format, std::string str) { return; } - std::filesystem::create_directories(dir); + if (!std::filesystem::create_directories(dir)) { + std::cerr << "mcopy: Failed to create directory '" << dir << "'\n"; + } if (!std::filesystem::copy_file(str, filename)) { std::cerr << "mcopy: Failed to copy file " << str << " to " << filename << "\n";