diff --git a/common/model-views.cpp b/common/model-views.cpp index 9e922a28cbd..4d4b1c5410c 100644 --- a/common/model-views.cpp +++ b/common/model-views.cpp @@ -4436,9 +4436,10 @@ namespace rs2 int recording_setting = config_file::instance().get(configurations::record::file_save_mode); std::string path = ""; std::string default_path = config_file::instance().get(configurations::record::default_path); + std::string tmp = default_path; if (!ends_with(default_path, "/") && !ends_with(default_path, "\\")) default_path += "/"; std::string default_filename = rs2::get_timestamped_file_name() + ".bag"; - if (recording_setting == 0) + if (recording_setting == 0 && !tmp.empty()) { path = default_path + default_filename; } diff --git a/common/os.cpp b/common/os.cpp index 5f61921e6a2..4c6599d049b 100644 --- a/common/os.cpp +++ b/common/os.cpp @@ -287,6 +287,11 @@ Some auxillary functionalities might be affected. Please report this message if res = str; res += "\\"; } + else if ( f == user_documents) + { + std::string msg = "Failed to get Documents directory"; + rs2::log(RS2_LOG_SEVERITY_INFO, msg.c_str()); + } else { throw std::runtime_error("Failed to get requested special folder");