Aria2: Aria2c treats absolute paths as if they were relative

Created on 18 Jun 2016  路  4Comments  路  Source: aria2/aria2

When downloading an URL using the -o option referring to an absolute path, aria2c always assumes that the path provided is a relative path, and merges it with the current working directory.

Thus, if I tell it aria2c -o /index.html http://example.com/index.html, it will save it to $PWD//index.html and not to /index.html which was what I expected.

In the man page I found no indication that this may be intended behaviour.

Here is some information that may be relevant, from aria2c --version:

aria2 version 1.24.0
(...)
** Configuration **
Enabled Features: Async DNS, BitTorrent, Firefox3 Cookie, GZip, HTTPS, Message Digest, Metalink, XML-RPC, SFTP
Hash Algorithms: sha-1, sha-224, sha-256, sha-384, sha-512, md5, adler32
Libraries: zlib/1.2.8 libxml2/2.9.4 sqlite3/3.13.0 GnuTLS/3.4.13 nettle GMP/6.1.0 c-ares/1.11.0 libssh2/1.7.0
Compiler: gcc 6.1.1 20160602
  built by   x86_64-pc-linux-gnu
  on         Jun 15 2016 13:18:23
System: Linux 4.6.2-1-ARCH #1 SMP PREEMPT Wed Jun 8 08:40:59 CEST 2016 x86_64
doc enhancement

All 4 comments

It is by design. -o is always relative to the directory given in --dir. We'll add new some text to manual page to describe this.

I see. Thank you for the information. I guess that if I add -d / I can get the behaviour I was expecting.

Thank you for comments. Due to task management for upcoming v1.25.0, I keep open this issue until we document the current behaviour of --out and -d option.

Fix committed via 2365c91

Was this page helpful?
0 / 5 - 0 ratings