From aa980baf5043b601963fea8a97e8dd4875481c7e Mon Sep 17 00:00:00 2001 From: Peter Stuifzand Date: Wed, 24 Jun 2020 00:27:48 +0200 Subject: [PATCH] Use the dirname --- file.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/file.go b/file.go index b93ba16..ee9ec57 100644 --- a/file.go +++ b/file.go @@ -137,7 +137,7 @@ func saveLinks(fp *FilePages) error { results = append(results, Document{page.Title}) } - f, err := os.Create(LinksFile) + f, err := os.Create(filepath.Join(fp.dirname, LinksFile) if err != nil { return err } @@ -194,7 +194,7 @@ func saveDocuments(fp *FilePages) error { }) } - f, err := os.Create(DocumentsFile) + f, err := os.Create(filepath.Join(fp.dirname, DocumentsFile) if err != nil { return err }