mirror of
https://git.mills.io/prologic/zs
synced 2025-02-19 21:43:14 +03:00
added check for fs walk errors
This commit is contained in:
parent
61600d0951
commit
b31a2cc1ca
5
zs.go
5
zs.go
@ -243,6 +243,11 @@ func buildAll(watch bool) {
|
|||||||
if filepath.Base(path)[0] == '.' || strings.HasPrefix(path, ".") {
|
if filepath.Base(path)[0] == '.' || strings.HasPrefix(path, ".") {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
// inform user about fs walk errors, but continue iteration
|
||||||
|
if err != nil {
|
||||||
|
log.Println("ERROR:", err)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
if info.IsDir() {
|
if info.IsDir() {
|
||||||
os.Mkdir(filepath.Join(PUBDIR, path), 0755)
|
os.Mkdir(filepath.Join(PUBDIR, path), 0755)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user