mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 22:55:48 +01: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
1 changed files with 2 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue