aboutsummaryrefslogtreecommitdiff
path: root/weed/replication
diff options
context:
space:
mode:
authorKonstantin Lebedev <9497591+kmlebedev@users.noreply.github.com>2023-09-27 17:40:51 +0500
committerGitHub <noreply@github.com>2023-09-27 05:40:51 -0700
commit44906f1f3b91b9def7e1424fec18a3237b1a02f0 (patch)
treeb01123aa276e62193e2a6fc704d78c776dd369e2 /weed/replication
parent9d589b48e6b59cf60df4e0c00fdc69edb62a216a (diff)
downloadseaweedfs-44906f1f3b91b9def7e1424fec18a3237b1a02f0.tar.xz
seaweedfs-44906f1f3b91b9def7e1424fec18a3237b1a02f0.zip
fix: avoid error file name too long when writing a file (#4876)
Diffstat (limited to 'weed/replication')
-rw-r--r--weed/replication/sink/localsink/local_sink.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/replication/sink/localsink/local_sink.go b/weed/replication/sink/localsink/local_sink.go
index 70f5cfc9d..134d3985a 100644
--- a/weed/replication/sink/localsink/local_sink.go
+++ b/weed/replication/sink/localsink/local_sink.go
@@ -90,7 +90,7 @@ func (localsink *LocalSink) CreateEntry(key string, entry *filer_pb.Entry, signa
return os.Mkdir(key, os.FileMode(entry.Attributes.FileMode))
}
- dstFile, err := os.OpenFile(key, os.O_RDWR|os.O_CREATE|os.O_TRUNC, os.FileMode(entry.Attributes.FileMode))
+ dstFile, err := os.OpenFile(util.ToShortFileName(key), os.O_RDWR|os.O_CREATE|os.O_TRUNC, os.FileMode(entry.Attributes.FileMode))
if err != nil {
return err
}