mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-03 05:50:08 +08:00
continueOnError for RemoveFiles
Allow the purge to continue even if one of the files fails to be removed.
This commit is contained in:
parent
6e29d1b087
commit
a78acbb247
@ -117,10 +117,10 @@ func (fs *FSHelper) RemoveFile(filename string) error {
|
||||
}
|
||||
|
||||
// RemoveFiles removes the given filenames
|
||||
func (fs *FSHelper) RemoveFiles(files []string) error {
|
||||
func (fs *FSHelper) RemoveFiles(files []string, continueOnError bool) error {
|
||||
for _, filename := range files {
|
||||
err := os.Remove(filename)
|
||||
if err != nil {
|
||||
if err != nil && !continueOnError {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user