Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use "." as file_observer output directory #310

Closed
kyllingstad opened this issue Jul 25, 2019 · 0 comments
Closed

Cannot use "." as file_observer output directory #310

kyllingstad opened this issue Jul 25, 2019 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@kyllingstad
Copy link
Member

kyllingstad commented Jul 25, 2019

The constructor expression file_observer(".") — which is a quite natural way to say store output in the current directory — throws an exception with the following message:

boost::filesystem::create_directories: Invalid argument

Presumably, this is because create_directories() won't create a directory named ".".

I can see two different ways to fix this:

  • Check whether the directory already exists using boost::filesystem::exists() before attempting to create it.
  • Make the directory name absolute using boost::filesystem::absolute() before passing it to create_directories().
@kyllingstad kyllingstad added bug Something isn't working good first issue Good for newcomers labels Jul 25, 2019
markaren added a commit that referenced this issue Aug 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant