fix: Don't use platform-specific path libraries for tar-internal path parsing
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
models "github.com/pojntfx/stfs/internal/db/sqlite/models/metadata"
|
models "github.com/pojntfx/stfs/internal/db/sqlite/models/metadata"
|
||||||
@@ -92,7 +92,7 @@ func (f *FileSystem) Open(name string) (afero.File, error) {
|
|||||||
|
|
||||||
hdr.Name,
|
hdr.Name,
|
||||||
|
|
||||||
filepath.Base(hdr.Name),
|
path.Base(hdr.Name),
|
||||||
NewFileInfo(hdr),
|
NewFileInfo(hdr),
|
||||||
|
|
||||||
f.onHeader,
|
f.onHeader,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"bufio"
|
"bufio"
|
||||||
"io"
|
"io"
|
||||||
"io/fs"
|
"io/fs"
|
||||||
"path/filepath"
|
"path"
|
||||||
|
|
||||||
"github.com/pojntfx/stfs/internal/compression"
|
"github.com/pojntfx/stfs/internal/compression"
|
||||||
"github.com/pojntfx/stfs/internal/converters"
|
"github.com/pojntfx/stfs/internal/converters"
|
||||||
@@ -81,7 +81,7 @@ func Fetch(
|
|||||||
|
|
||||||
if !preview {
|
if !preview {
|
||||||
if to == "" {
|
if to == "" {
|
||||||
to = filepath.Base(hdr.Name)
|
to = path.Base(hdr.Name)
|
||||||
}
|
}
|
||||||
|
|
||||||
if hdr.Typeflag == tar.TypeDir {
|
if hdr.Typeflag == tar.TypeDir {
|
||||||
|
|||||||
Reference in New Issue
Block a user