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,11 +135,17 @@ func (c *capturer) capturePartial(filenames ...string) error {
|
||||||
switch tp {
|
switch tp {
|
||||||
case bundleLeaf:
|
case bundleLeaf:
|
||||||
if err := c.handleDir(resolvedFilename); err != nil {
|
if err := c.handleDir(resolvedFilename); err != nil {
|
||||||
return err
|
// Directory may have been deleted.
|
||||||
|
if !os.IsNotExist(err) {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
case bundleBranch:
|
case bundleBranch:
|
||||||
if err := c.handleBranchDir(resolvedFilename); err != nil {
|
if err := c.handleBranchDir(resolvedFilename); err != nil {
|
||||||
return err
|
// Directory may have been deleted.
|
||||||
|
if !os.IsNotExist(err) {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
fi, err := c.resolveRealPath(resolvedFilename)
|
fi, err := c.resolveRealPath(resolvedFilename)
|
||||||
|
@ -510,7 +516,7 @@ func (c *capturer) readDir(dirname string) (pathLangFileFis, error) {
|
||||||
|
|
||||||
dir, err := c.fs.Open(dirname)
|
dir, err := c.fs.Open(dirname)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("readDir: %s", err)
|
return nil, err
|
||||||
}
|
}
|
||||||
defer dir.Close()
|
defer dir.Close()
|
||||||
fis, err := dir.Readdir(-1)
|
fis, err := dir.Readdir(-1)
|
||||||
|
|
Loading…
Reference in a new issue