mirror of
https://github.com/simon-ding/polaris.git
synced 2026-03-04 00:20:47 +08:00
fix: remove files
This commit is contained in:
@@ -72,6 +72,6 @@ func (l *LocalStorage) UploadProgress() float64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (i *LocalStorage) RemoveAll(path string) error {
|
||||
return os.RemoveAll(path)
|
||||
func (l *LocalStorage) RemoveAll(path string) error {
|
||||
return os.RemoveAll(filepath.Join(l.dir, path))
|
||||
}
|
||||
@@ -87,5 +87,5 @@ func (w *WebdavStorage) UploadProgress() float64 {
|
||||
}
|
||||
|
||||
func (w *WebdavStorage) RemoveAll(path string) error {
|
||||
return w.fs.RemoveAll(path)
|
||||
return w.fs.RemoveAll(filepath.Join(w.dir, path))
|
||||
}
|
||||
|
||||
@@ -186,6 +186,8 @@ func (s *Server) DeleteFromWatchlist(c *gin.Context) (interface{}, error) {
|
||||
} else {
|
||||
if err := st.RemoveAll(m.TargetDir); err != nil {
|
||||
log.Warnf("remove all : %v", err)
|
||||
} else {
|
||||
log.Infof("delete media files success: %v", m.TargetDir)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user