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 }