about summary refs log tree commit diff
path: root/cli/add.c
diff options
context:
space:
mode:
Diffstat (limited to 'cli/add.c')
-rw-r--r--cli/add.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/add.c b/cli/add.c
index 585529b..e88a0b0 100644
--- a/cli/add.c
+++ b/cli/add.c
@@ -89,8 +89,8 @@ cmd_add(int argc, char **argv)
         buf_write(&iob, td, tdlen);
     }
     buf_swrite(&iob, "\0");
-    if (realpath(iob.buf, dpath) == NULL)
-        err(1, "realpath '%s'", dpath);
+    if ((errno = make_abs_path(iob.buf, dpath)) != 0)
+        err(1, "make_abs_path '%s'", dpath);
     code = btpd_add(ipc, mi, mi_size, dpath, name);
     if (code == 0 && start) {
         struct ipc_torrent tspec;