-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
boundos:insideBaseDirEval: return true if baseDir is "/"
insideBaseDirEval would fail if baseDir was "/". Since "/" contains anything, and can never be a symlink, just return true, nil if baseDir is "/". Add a simple test for this case. Also, while we are at it, have the returned error be a lot more informative: show the name and the base diectory; further, have it wrap os.ErrNotExist should anyone wish to use errors.Is at some point. Signed-off-by: Ronald G Minnich <rminnich@gmail.com>
- Loading branch information
Showing
2 changed files
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters