fix: avoid error file name too long when writing a file (#4876)
This commit is contained in:
committed by
GitHub
parent
9d589b48e6
commit
44906f1f3b
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user