mirror of
https://github.com/vbatts/go-mtree.git
synced 2024-11-25 17:45:39 +00:00
Recognize path when validating
Fixes #11. After changing the directory to the root directory specified, we want to call lstat on a relative path, instead of joining the full root path with the file name. Signed-off-by: Stephen Chung <schung@redhat.com>
This commit is contained in:
parent
d906a5994a
commit
72cbe00536
1 changed files with 1 additions and 2 deletions
3
check.go
3
check.go
|
@ -50,8 +50,7 @@ func Check(root string, dh *DirectoryHierarchy, keywords []string) (*Result, err
|
||||||
creator.curSet = nil
|
creator.curSet = nil
|
||||||
}
|
}
|
||||||
case RelativeType, FullType:
|
case RelativeType, FullType:
|
||||||
filename := filepath.Join(root, e.Path())
|
info, err := os.Lstat(e.Path())
|
||||||
info, err := os.Lstat(filename)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue