Abort with an error if the argument of --root= is not a directory

Create issue
Issue #982 closed
anonymous created an issue

Currently, when GetComponnents is invoked as

GetComponents --root=<dir>

and <dir> does not exist, Getcomponents just ignores the option. I would be better if GetComponents aborted with an error if the argument of --root= is not a valid directory.

Keyword: error
Keyword: detection

Comments (6)

  1. Frank Löffler

    I cannot reproduce this. When given a name which doesn't exist yet GetComponents creates that directory for me. When that name is something else than a directory I get a lot of error messages about not being able to change into that directory (which could be improved), but nothing seriously goes wrong.

  2. Roland Haas
    • removed comment

    I agree with Frank that I cannot reproduce this. However error handling in this case should actually detect this and abort much earlier. The attached patch tests for $ROOT being a folder (if it exists at all) as early as possible and aborts with an error if this is not the case.

  3. Tanja Bode
    • changed status to open
    • removed comment

    Updated the patch with fixed spelling. Does what it should do. Go ahead and push.

  4. Log in to comment