2
2
réplica de https://github.com/Hilbis/Hilbish sincronizado 2025-07-12 05:42:02 +00:00

Comparar comentimentos

..

2 Cometimentos

Autor(a) SHA1 Mensagem Data
sammyette
afcc6fe63a
fix: handle error case of target in fs.cd not being a dir (closes #66) 2021-09-28 22:55:08 -04:00
sammyette
a6a3962044
fix: correct url to github repo and add newline after error 2021-09-28 22:54:04 -04:00

Ver ficheiro

@ -35,9 +35,11 @@ func cd(L *lua.LState) int {
switch e := err.(*os.PathError).Err.Error(); e { switch e := err.(*os.PathError).Err.Error(); e {
case "no such file or directory": case "no such file or directory":
LuaErr(L, 1) LuaErr(L, 1)
case "not a directory":
LuaErr(L, 2)
default: default:
fmt.Printf("Found unhandled error case: %s", e) fmt.Printf("Found unhandled error case: %s\n", e)
fmt.Printf("Report this at https://github.com/Hilbis/Hilbish/issues with the title being: \"fs: unahndled error case %s\", and show what caused it.\n", e) fmt.Printf("Report this at https://github.com/Rosettea/Hilbish/issues with the title being: \"fs: unhandled error case %s\", and show what caused it.\n", e)
LuaErr(L, 213) LuaErr(L, 213)
} }
} }