1
0
Fork 0

use stat[11] == "dir" instead of deprecated io.isdir()

This commit is contained in:
mfranz 2009-02-15 18:24:22 +00:00
parent 9241e1af84
commit b95ea91501

View file

@ -175,7 +175,7 @@
if (stat == nil) # dead link
continue;
if (io.isdir(stat[2]))
if (stat[11] == "dir")
append(dirs, e ~ "/");
elsif (!size(pattern) or matches(e))
append(files, e);
@ -242,7 +242,7 @@
file_input();
var p = string.normpath(current.dir ~ "/" ~ current.file);
var stat = io.stat(p);
path.setValue(stat != nil and io.isdir(stat[2]) ? p ~ "/" : p);
path.setValue(stat != nil and stat[11] == "dir" ? p ~ "/" : p);
file.setValue(current.file);
close();
}