Skip to content

Viewer starts without Documents directory - #6567

Merged
ev-mp merged 1 commit into
realsenseai:developmentfrom
aseelegbaria:Documents
Jul 30, 2020
Merged

Viewer starts without Documents directory#6567
ev-mp merged 1 commit into
realsenseai:developmentfrom
aseelegbaria:Documents

Conversation

@aseelegbaria

@aseelegbaria aseelegbaria commented Jun 10, 2020

Copy link
Copy Markdown
Contributor

Addresses #5707
Tracked on: DSO-13589

@ev-mp ev-mp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, please verify this behavior under

  1. User path requires admin credentials.
    2 The path points to network resource

Comment thread common/os.cpp Outdated
Comment thread common/os.cpp Outdated
@aseelegbaria aseelegbaria changed the title Documents folder is created if it doesn't exist Viewer starts without Documents directory Jun 15, 2020

@maloel maloel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed with Aseel, a solution that automatically creates a Documents folder for the user is problematic and not needed.

What is needed is for the Viewer to not crash or behave badly.

Since the folder is controlled by settings, if it does not exist a log should simply not be written.
Same for recording: the folder is controlled by settings. If the folder does not exist, when the user presses Record then we should query the user for a location through the regular means (which should already exist).

Comment thread common/os.cpp Outdated
else if ( f == user_documents)
{
std::string msg = "Failed to get Documents directory";
rs2::log(RS2_LOG_SEVERITY_INFO, msg.c_str());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not Error?

Comment thread common/model-views.cpp Outdated
@maloel
maloel requested a review from ev-mp July 27, 2020 06:06
Comment thread common/os.cpp Outdated
}
else if ( f == user_documents)
{
std::string msg = "Failed to get Documents directory";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls parse and print the value of HRESULT hr = SHGetKnownFolderPath(... - there are additional failure cases as well

@ev-mp ev-mp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks.

@ev-mp
ev-mp merged commit 8b088c1 into realsenseai:development Jul 30, 2020
@aseelegbaria
aseelegbaria deleted the Documents branch May 2, 2021 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants