Updates to always use expanded filepath for all stat operations

This commit is contained in:
sloum 2022-07-06 14:50:56 -07:00
parent 07aa409056
commit 0422ea8fb4
1 changed files with 2 additions and 1 deletions

3
lib.go
View File

@ -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