mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-14 13:27:09 +02:00
Revert "Refactor walkDirTree to use fs.FS"
This reverts commit 3853c3318f.
This commit is contained in:
parent
3853c3318f
commit
6b3b4d83ff
5 changed files with 110 additions and 96 deletions
18
utils/paths.go
Normal file
18
utils/paths.go
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
package utils
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/navidrome/navidrome/log"
|
||||
)
|
||||
|
||||
func IsDirReadable(path string) (bool, error) {
|
||||
dir, err := os.Open(path)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
if err := dir.Close(); err != nil {
|
||||
log.Error("Error closing directory", "path", path, err)
|
||||
}
|
||||
return true, nil
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue