mirror of
https://github.com/simon-ding/polaris.git
synced 2026-02-28 06:30:45 +08:00
fix: mkdir
This commit is contained in:
@@ -99,6 +99,7 @@ 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)
|
||||
path := filepath.Join(l.dir, name)
|
||||
os.MkdirAll(filepath.Dir(path), os.ModePerm)
|
||||
return os.WriteFile(path, data, os.ModePerm)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user