Ver Fonte

attempt two for skipping files in the file walk (#105)

Patrick Devine há 1 ano atrás
pai
commit
9e15635c2d
1 ficheiros alterados com 2 adições e 1 exclusões
  1. 2 1
      server/routes.go

+ 2 - 1
server/routes.go

@@ -195,7 +195,8 @@ func list(c *gin.Context) {
 		if !info.IsDir() {
 			fi, err := os.Stat(path)
 			if err != nil {
-				return err
+				log.Printf("skipping file: %s", fp)
+				return nil
 			}
 			path := path[len(fp)+1:]
 			slashIndex := strings.LastIndex(path, "/")