Skip to content

Commit b6ab7bc

Browse files
committed
auto create dir '~/.aria2/'
1 parent 7e57fc0 commit b6ab7bc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ func writeConf(data []string) error {
4343
if err != nil {
4444
return err
4545
}
46+
dir1 := filepath.Join(home, ".aria2")
47+
os.Mkdir(dir1, os.ModePerm)
4648
confPath := filepath.Join(home, ".aria2", "aria2.conf")
4749
fp, err := os.Create(confPath)
4850
if err != nil {

0 commit comments

Comments
 (0)