Skip to content

Commit

Permalink
viewer starts without Documents directory
Browse files Browse the repository at this point in the history
  • Loading branch information
aseelegbaria committed Jun 15, 2020
1 parent 3e7b5e6 commit 5b11425
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion common/model-views.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
5 changes: 5 additions & 0 deletions common/os.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 5b11425

Please sign in to comment.