mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
parent
d999b4e82b
commit
0a88741fe8
1 changed files with 9 additions and 3 deletions
|
@ -135,12 +135,18 @@ func (c *capturer) capturePartial(filenames ...string) error {
|
|||
switch tp {
|
||||
case bundleLeaf:
|
||||
if err := c.handleDir(resolvedFilename); err != nil {
|
||||
// Directory may have been deleted.
|
||||
if !os.IsNotExist(err) {
|
||||
return err
|
||||
}
|
||||
}
|
||||
case bundleBranch:
|
||||
if err := c.handleBranchDir(resolvedFilename); err != nil {
|
||||
// Directory may have been deleted.
|
||||
if !os.IsNotExist(err) {
|
||||
return err
|
||||
}
|
||||
}
|
||||
default:
|
||||
fi, err := c.resolveRealPath(resolvedFilename)
|
||||
if os.IsNotExist(err) {
|
||||
|
@ -510,7 +516,7 @@ func (c *capturer) readDir(dirname string) (pathLangFileFis, error) {
|
|||
|
||||
dir, err := c.fs.Open(dirname)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("readDir: %s", err)
|
||||
return nil, err
|
||||
}
|
||||
defer dir.Close()
|
||||
fis, err := dir.Readdir(-1)
|
||||
|
|
Loading…
Reference in a new issue