Updates to always use expanded filepath for all stat operations
This commit is contained in:
parent
07aa409056
commit
0422ea8fb4
3
lib.go
3
lib.go
|
@ -1789,7 +1789,8 @@ var stdLibrary = vars{
|
|||
if !ok {
|
||||
return exception("'file-stat' expects a filepath as a string, a non-string value was given")
|
||||
}
|
||||
info, err := os.Stat(ExpandedAbsFilepath(fp))
|
||||
fp = ExpandedAbsFilepath(fp)
|
||||
info, err := os.Stat(fp)
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
return false
|
||||
|
|
Loading…
Reference in New Issue