skip copying files only when there is a data path
This commit is contained in:
parent
bf1f01b9bf
commit
6bbd9e7b28
7
file.go
7
file.go
@ -80,8 +80,11 @@ func (file *File) Seek(offset int64, whence int) (int64, error) {
|
||||
|
||||
func (file *File) export(targetDir string) error {
|
||||
targetPath := filepath.Join(targetDir, file.sourcePath)
|
||||
if targetInfo, err := os.Stat(targetPath); err == nil && targetInfo.ModTime().After(file.ModTime()) {
|
||||
return nil
|
||||
|
||||
if len(file.dataPath) == 0 {
|
||||
if targetInfo, err := os.Stat(targetPath); err == nil && targetInfo.ModTime().After(file.ModTime()) {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
if err := os.MkdirAll(path.Dir(targetPath), 0755); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user