Skip to content

Commit fa5e611

Browse files
committed
file open 不用于输出
1 parent 409e43f commit fa5e611

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

bash/webdav/file2.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ func OpenFile(c *Client, filename string) *File {
4848
span.SetAttributes(
4949
attribute.String("filepath", filename),
5050
)
51+
span.AddEvent("nolog")
5152
return &File{
5253
Ctx: ctx,
5354

@@ -86,7 +87,7 @@ func (f *File) Read(p []byte) (n int, err error) {
8687
err0.Record(&err, span)
8788
})
8889

89-
stat := To1(f._Stat())
90+
stat := To1(f.Stat())
9091
if stat.IsDir() {
9192
return 0, io.EOF
9293
}
@@ -139,7 +140,7 @@ func (f *File) Seek(offset int64, whence int) (n int64, err error) {
139140
case io.SeekCurrent:
140141
f.cursor += offset
141142
case io.SeekEnd:
142-
stat := To1(f._Stat())
143+
stat := To1(f.Stat())
143144
f.cursor = stat.Size() + offset
144145
}
145146
n = f.cursor

0 commit comments

Comments
 (0)