|
@@ -10,6 +10,7 @@ import (
|
|
|
"github.com/robertkrimen/otto"
|
|
|
fs "imuslab.com/arozos/mod/filesystem"
|
|
|
"imuslab.com/arozos/mod/filesystem/fssort"
|
|
|
+ "imuslab.com/arozos/mod/filesystem/hidden"
|
|
|
user "imuslab.com/arozos/mod/user"
|
|
|
)
|
|
|
|
|
@@ -336,6 +337,11 @@ func (g *Gateway) injectFileLibFunctions(vm *otto.Otto, u *user.User) {
|
|
|
//Return the results in virtual paths
|
|
|
results := []string{}
|
|
|
for _, file := range newFilelist {
|
|
|
+ isHidden, _ := hidden.IsHidden(file, true)
|
|
|
+ if isHidden {
|
|
|
+ //Hidden file. Skip this
|
|
|
+ continue
|
|
|
+ }
|
|
|
thisRpath, _ := realpathToVirtualpath(filepath.ToSlash(file), u)
|
|
|
results = append(results, thisRpath)
|
|
|
}
|
|
@@ -402,6 +408,11 @@ func (g *Gateway) injectFileLibFunctions(vm *otto.Otto, u *user.User) {
|
|
|
//Parse the results (Only extract the filepath)
|
|
|
results := []string{}
|
|
|
for _, filename := range newFilelist {
|
|
|
+ isHidden, _ := hidden.IsHidden(filename, true)
|
|
|
+ if isHidden {
|
|
|
+ //Hidden file. Skip this
|
|
|
+ continue
|
|
|
+ }
|
|
|
thisVpath, _ := u.RealPathToVirtualPath(filename)
|
|
|
results = append(results, thisVpath)
|
|
|
}
|