Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2207e4a4a4 |
+7
-1
@@ -3,6 +3,7 @@ package zones
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"io/fs"
|
"io/fs"
|
||||||
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/hack-pad/hackpadfs/os"
|
"github.com/hack-pad/hackpadfs/os"
|
||||||
|
|
||||||
@@ -105,7 +106,12 @@ func NewFS(dir fs.FS, domain string) (*Zones, error) {
|
|||||||
|
|
||||||
// New builds a [Zones] tree using the given directory
|
// New builds a [Zones] tree using the given directory
|
||||||
func New(dir, domain string) (*Zones, error) {
|
func New(dir, domain string) (*Zones, error) {
|
||||||
base, err := os.NewFS().Sub(dir)
|
dir, err := filepath.Abs(dir)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
base, err := os.NewFS().Sub(dir[1:])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user