refactor: Use filepath.ToSlash explicitly for FileConfig, name, to and from params

This commit is contained in:
Felicitas Pojtinger
2021-12-20 02:48:07 +01:00
parent ead0f37858
commit 64db9a586f
8 changed files with 19 additions and 5 deletions

View File

@@ -3,6 +3,7 @@ package operations
import (
"archive/tar"
"context"
"path/filepath"
"github.com/pojntfx/stfs/internal/converters"
models "github.com/pojntfx/stfs/internal/db/sqlite/models/metadata"
@@ -15,6 +16,8 @@ import (
)
func (o *Operations) Delete(name string) error {
name = filepath.ToSlash(name)
o.diskOperationLock.Lock()
defer o.diskOperationLock.Unlock()