diff options
| author | Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.com> | 2023-09-27 17:40:51 +0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-27 05:40:51 -0700 |
| commit | 44906f1f3b91b9def7e1424fec18a3237b1a02f0 (patch) | |
| tree | b01123aa276e62193e2a6fc704d78c776dd369e2 /weed/replication | |
| parent | 9d589b48e6b59cf60df4e0c00fdc69edb62a216a (diff) | |
| download | seaweedfs-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.go | 2 |
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 } |
