From 86ed27f602e47d1db69a592efa51d909ba5cb775 Mon Sep 17 00:00:00 2001 From: chrislu Date: Thu, 7 Apr 2022 00:33:13 -0700 Subject: [PATCH] mount: remove leftover socket file --- weed/command/mount_std.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/weed/command/mount_std.go b/weed/command/mount_std.go index 7926c9cdc..1d929dc96 100644 --- a/weed/command/mount_std.go +++ b/weed/command/mount_std.go @@ -108,9 +108,9 @@ func RunMount(option *MountOptions, umask os.FileMode) bool { mountDirHash = -mountDirHash } *option.localSocket = fmt.Sprintf("/tmp/seaweefs-mount-%d.sock", mountDirHash) - if err := os.Remove(*option.localSocket); err != nil && !os.IsNotExist(err) { - glog.Fatalf("Failed to remove %s, error: %s", *option.localSocket, err.Error()) - } + } + if err := os.Remove(*option.localSocket); err != nil && !os.IsNotExist(err) { + glog.Fatalf("Failed to remove %s, error: %s", *option.localSocket, err.Error()) } montSocketListener, err := net.Listen("unix", *option.localSocket) if err != nil {