mirror of
https://github.com/simon-ding/polaris.git
synced 2026-06-06 10:07:45 +08:00
fix: dir not exist
This commit is contained in:
@@ -99,5 +99,6 @@ func (l *LocalStorage) ReadFile(name string) ([]byte, error) {
|
||||
}
|
||||
|
||||
func (l *LocalStorage) WriteFile(name string, data []byte) error {
|
||||
os.MkdirAll(filepath.Dir(name), os.ModePerm)
|
||||
return os.WriteFile(filepath.Join(l.dir, name), data, os.ModePerm)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user