Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

mount: remove leftover socket file

chrislu86ed27f602e4
diff --git a/weed/command/mount_std.go b/weed/command/mount_std.go
index 7926c9cdc5..1d929dc963 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 {