From 29495ab53bebbdfde86dc9488acfe236d3669e57 Mon Sep 17 00:00:00 2001 From: Richard Nyberg Date: Sat, 14 Oct 2006 21:29:25 +0000 Subject: Add and use the function make_abs_path. realpath didn't fit my needs. make_abs_path doesn't need the directories to actually exist in the file system. --- cli/add.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cli') 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; -- cgit 1.4.1