@@ -129,7 +129,7 @@ func (pfs *PinFS) Stat(name string) (fs.FileInfo, error) {
129
129
if subsys := pfs .ipfs ; subsys != nil {
130
130
return fs .Stat (subsys , name )
131
131
}
132
- return nil , fserrors .New (op , name , filesystem . ErrNotFound , fserrors .NotExist )
132
+ return nil , fserrors .New (op , name , fs . ErrNotExist , fserrors .NotExist )
133
133
}
134
134
135
135
func (pfs * PinFS ) Open (name string ) (fs.File , error ) {
@@ -140,7 +140,7 @@ func (pfs *PinFS) Open(name string) (fs.File, error) {
140
140
if subsys := pfs .ipfs ; subsys != nil {
141
141
return subsys .Open (name )
142
142
}
143
- return nil , fserrors .New (op , name , filesystem . ErrNotFound , fserrors .NotExist )
143
+ return nil , fserrors .New (op , name , fs . ErrNotExist , fserrors .NotExist )
144
144
}
145
145
146
146
func (pfs * PinFS ) openRoot () (fs.ReadDirFile , error ) {
@@ -285,7 +285,7 @@ func (pd *pinDirectory) ReadDir(count int) ([]fs.DirEntry, error) {
285
285
if stream == nil {
286
286
// TODO: We don't have an error kind
287
287
// that translates into EBADF
288
- return nil , fserrors .New (op , filesystem .Root , filesystem . ErrNotOpen , fserrors .IO )
288
+ return nil , fserrors .New (op , filesystem .Root , fs . ErrClosed , fserrors .IO )
289
289
}
290
290
var (
291
291
ctx = stream .Context
@@ -307,7 +307,7 @@ func (pd *pinDirectory) StreamDir() <-chan filesystem.StreamDirEntry {
307
307
// TODO: We don't have an error kind
308
308
// that translates into EBADF
309
309
errs <- newErrorEntry (
310
- fserrors .New (op , filesystem .Root , filesystem . ErrNotOpen , fserrors .IO ),
310
+ fserrors .New (op , filesystem .Root , fs . ErrClosed , fserrors .IO ),
311
311
)
312
312
return errs
313
313
}
@@ -323,7 +323,7 @@ func (pd *pinDirectory) Close() error {
323
323
}
324
324
// TODO: We don't have an error kind
325
325
// that translates into EBADF
326
- return fserrors .New (op , filesystem .Root , filesystem . ErrNotOpen , fserrors .IO )
326
+ return fserrors .New (op , filesystem .Root , fs . ErrClosed , fserrors .IO )
327
327
}
328
328
329
329
func (pe * pinDirEntry ) Name () string {
0 commit comments