refactor: Rewrite path sanitizer to support write operations on relative tar archives
This commit is contained in:
@@ -349,6 +349,9 @@ func (f *File) Name() string {
|
||||
"name": f.name,
|
||||
})
|
||||
|
||||
f.ioLock.Lock()
|
||||
defer f.ioLock.Unlock()
|
||||
|
||||
return f.name
|
||||
}
|
||||
|
||||
@@ -357,6 +360,9 @@ func (f *File) Stat() (os.FileInfo, error) {
|
||||
"name": f.name,
|
||||
})
|
||||
|
||||
f.ioLock.Lock()
|
||||
defer f.ioLock.Unlock()
|
||||
|
||||
return f.info, nil
|
||||
}
|
||||
|
||||
@@ -366,6 +372,9 @@ func (f *File) Readdir(count int) ([]os.FileInfo, error) {
|
||||
"count": count,
|
||||
})
|
||||
|
||||
f.ioLock.Lock()
|
||||
defer f.ioLock.Unlock()
|
||||
|
||||
hdrs, err := inventory.List(
|
||||
f.metadata,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user