aboutsummaryrefslogtreecommitdiff
path: root/weed/filesys/filehandle.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/filesys/filehandle.go')
-rw-r--r--weed/filesys/filehandle.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/weed/filesys/filehandle.go b/weed/filesys/filehandle.go
index 9acede330..5cd7ca948 100644
--- a/weed/filesys/filehandle.go
+++ b/weed/filesys/filehandle.go
@@ -114,6 +114,16 @@ func (fh *FileHandle) readFromChunks(buff []byte, offset int64) (int64, error) {
return 0, io.EOF
}
+ if entry.IsInRemoteOnly() {
+ glog.V(4).Infof("download remote entry %s", fh.f.fullpath())
+ newEntry, err := fh.f.downloadRemoteEntry(entry)
+ if err != nil {
+ glog.V(1).Infof("download remote entry %s: %v", fh.f.fullpath(), err)
+ return 0, err
+ }
+ entry = newEntry
+ }
+
fileSize := int64(filer.FileSize(entry))
fileFullPath := fh.f.fullpath()