diff options
author | mitchell <70453897+orbitalquark@users.noreply.github.com> | 2020-11-03 11:24:27 -0500 |
---|---|---|
committer | mitchell <70453897+orbitalquark@users.noreply.github.com> | 2020-11-03 11:24:27 -0500 |
commit | 87a11d65ee576d965bcf432e878f191512e46bdd (patch) | |
tree | 193ffc07d4bf4e0423e9e45ef8110639568ef9eb /core/lfs_ext.lua | |
parent | 85b8810660ffa37eb2d3edf85a4dbf12ba5f1ca3 (diff) |
Fixed `lfs.walk()` bug with root directory.
Prevent dir to walk from becoming an empty string.
Diffstat (limited to 'core/lfs_ext.lua')
-rw-r--r-- | core/lfs_ext.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/lfs_ext.lua b/core/lfs_ext.lua index d55dbf0b..842c1737 100644 --- a/core/lfs_ext.lua +++ b/core/lfs_ext.lua @@ -85,7 +85,7 @@ end -- @see filter -- @name walk function lfs.walk(dir, filter, n, include_dirs) - dir = assert_type(dir, 'string', 1):match('^(.-)[/\\]?$') + dir = assert_type(dir, 'string', 1):match('^(..-)[/\\]?$') if not assert_type(filter, 'string/table/nil', 2) then filter = lfs.default_filter end |