diff options
| author | Farbod <105163300+itsfarbod@users.noreply.github.com> | 2023-12-12 19:16:45 +0330 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-12 07:46:45 -0800 |
| commit | d5c01e5ceb91c8ebd97e957376488d03c4867836 (patch) | |
| tree | ee5959e168b853e7aa2d28342962d26433287b2a /weed/filer/remote_mapping.go | |
| parent | 61b05fad9500ee54908fe33d9185cc28bee5ba63 (diff) | |
| download | seaweedfs-d5c01e5ceb91c8ebd97e957376488d03c4867836.tar.xz seaweedfs-d5c01e5ceb91c8ebd97e957376488d03c4867836.zip | |
Remote gateway Bug fix (#5100)
Diffstat (limited to 'weed/filer/remote_mapping.go')
| -rw-r--r-- | weed/filer/remote_mapping.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/weed/filer/remote_mapping.go b/weed/filer/remote_mapping.go index 8a7bea3d6..c8adbeb4d 100644 --- a/weed/filer/remote_mapping.go +++ b/weed/filer/remote_mapping.go @@ -15,9 +15,11 @@ func ReadMountMappings(grpcDialOption grpc.DialOption, filerAddress pb.ServerAdd oldContent, readErr = ReadInsideFiler(client, DirectoryEtcRemote, REMOTE_STORAGE_MOUNT_FILE) return readErr }); readErr != nil { - return nil, readErr + if readErr != filer_pb.ErrNotFound { + return nil, fmt.Errorf("read existing mapping: %v", readErr) + } + oldContent = nil } - mappings, readErr = UnmarshalRemoteStorageMappings(oldContent) if readErr != nil { return nil, fmt.Errorf("unmarshal mappings: %v", readErr) |
