Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
u-root.go: test for relative paths with os.Stat()
The current u-root has gotten a little frustrating with messages like this: 22:35:48 "cpu/cmds/cpud/" is not a valid path, allowed are only existing relative or absolute file paths! Which is not only wrong, in this case: the path cpu/cmds/cpud does exist and is relative, but very confusing when you use ./cpud/cmds/cpud instead. Do the easy thing with the arg to validateArg first: just os.Stat(). If it fails, the more complex test can be used, but if it succeeds, time is saved. Signed-off-by: Ronald G. Minnich <[email protected]>
- Loading branch information