Skip to content

Commit 5b11425

Browse files
author
aseelegbaria
committed
viewer starts without Documents directory
1 parent 3e7b5e6 commit 5b11425

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

common/model-views.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4436,9 +4436,10 @@ namespace rs2
44364436
int recording_setting = config_file::instance().get(configurations::record::file_save_mode);
44374437
std::string path = "";
44384438
std::string default_path = config_file::instance().get(configurations::record::default_path);
4439+
std::string tmp = default_path;
44394440
if (!ends_with(default_path, "/") && !ends_with(default_path, "\\")) default_path += "/";
44404441
std::string default_filename = rs2::get_timestamped_file_name() + ".bag";
4441-
if (recording_setting == 0)
4442+
if (recording_setting == 0 && !tmp.empty())
44424443
{
44434444
path = default_path + default_filename;
44444445
}

common/os.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,11 @@ Some auxillary functionalities might be affected. Please report this message if
287287
res = str;
288288
res += "\\";
289289
}
290+
else if ( f == user_documents)
291+
{
292+
std::string msg = "Failed to get Documents directory";
293+
rs2::log(RS2_LOG_SEVERITY_INFO, msg.c_str());
294+
}
290295
else
291296
{
292297
throw std::runtime_error("Failed to get requested special folder");

0 commit comments

Comments
 (0)