aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_remote_mount.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/shell/command_remote_mount.go')
-rw-r--r--weed/shell/command_remote_mount.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/weed/shell/command_remote_mount.go b/weed/shell/command_remote_mount.go
index 8e12ae3d5..c2d9ec6ba 100644
--- a/weed/shell/command_remote_mount.go
+++ b/weed/shell/command_remote_mount.go
@@ -124,7 +124,7 @@ func syncMetadata(commandEnv *CommandEnv, writer io.Writer, dir string, nonEmpty
Name: name,
})
if lookupErr != nil {
- if !strings.Contains(lookupErr.Error(), filer_pb.ErrNotFound.Error()) {
+ if strings.Contains(lookupErr.Error(), filer_pb.ErrNotFound.Error()) {
_, createErr := client.CreateEntry(context.Background(), &filer_pb.CreateEntryRequest{
Directory: parent,
Entry: &filer_pb.Entry{
@@ -135,6 +135,9 @@ func syncMetadata(commandEnv *CommandEnv, writer io.Writer, dir string, nonEmpty
Crtime: time.Now().Unix(),
FileMode: uint32(0644 | os.ModeDir),
},
+ RemoteEntry: &filer_pb.RemoteEntry{
+ StorageName: remoteConf.Name,
+ },
},
})
return createErr
@@ -171,7 +174,6 @@ func syncMetadata(commandEnv *CommandEnv, writer io.Writer, dir string, nonEmpty
return nil
}
-
// if an entry has synchronized metadata but has not synchronized content
// entry.Attributes.FileSize == entry.RemoteEntry.RemoteSize
// entry.Attributes.Mtime == entry.RemoteEntry.RemoteMtime