mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +01:00
docs: Bug fix: directory must be removed by os.RemoveAll
This commit is contained in:
parent
db22bf6242
commit
719cc03123
18
_docs/gen.go
18
_docs/gen.go
@ -151,23 +151,29 @@ func clear() error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if m, _ := regexp.MatchString("~$", path); m {
|
||||
return nil
|
||||
}
|
||||
// Remove auto-generated html files.
|
||||
m, err := regexp.MatchString(".html$", path)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !m {
|
||||
return nil
|
||||
if m {
|
||||
return os.Remove(path)
|
||||
}
|
||||
// Remove example resources that are copied.
|
||||
m, err = regexp.MatchString("public/example/images", path)
|
||||
m, err = regexp.MatchString("^public/example/images$", path)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !m {
|
||||
return nil
|
||||
if m {
|
||||
if err := os.RemoveAll(path); err != nil {
|
||||
return err
|
||||
}
|
||||
return filepath.SkipDir
|
||||
}
|
||||
return os.Remove(path)
|
||||
return nil
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user