mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-20 22:07:43 +03:00
fix: error message
This commit is contained in:
parent
a412989f7e
commit
8ce796756f
@ -109,12 +109,11 @@ func (fs *mediaFileSystem) Open(name string) (http.File, error) {
|
||||
}
|
||||
|
||||
func (fs *mediaFileSystem) cacheFilePath(mf *model.MediaFile, bitRate int, format string) string {
|
||||
// Break the cache in subfolders, to avoid too many files in the same folder
|
||||
subDir := strings.ToLower(mf.ID[:2])
|
||||
subDir = filepath.Join(fs.cacheFolder, subDir)
|
||||
if err := os.Mkdir(subDir, 0755); err != nil {
|
||||
log.Error("Error creating cache folder. Bad things will happen", "folder", subDir, err)
|
||||
}
|
||||
|
||||
// Make sure the subfolder to exist
|
||||
os.Mkdir(subDir, 0755)
|
||||
return filepath.Join(subDir, fmt.Sprintf("%s.%d.%s", mf.ID, bitRate, format))
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user