mirror of
https://github.com/iyear/tdl
synced 2025-01-08 11:57:55 +08:00
fix(download): consider if a template specifies a sub directory (#498)
This commit is contained in:
parent
150d93e783
commit
56e4812e5f
@ -95,7 +95,7 @@ func (p *progress) donePost(elem *iterElem) error {
|
||||
}
|
||||
}
|
||||
|
||||
if err := os.Rename(elem.to.Name(), filepath.Join(p.opts.Dir, newfile)); err != nil {
|
||||
if err := os.Rename(elem.to.Name(), filepath.Join(filepath.Dir(elem.to.Name()), newfile)); err != nil {
|
||||
return errors.Wrap(err, "rename file")
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user