From cb448dad6ac4e2c88dc443a44eb25742007c4dd4 Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Wed, 9 Jan 2013 01:11:36 +0000 Subject: [PATCH] minor code simplification in torrent.c's deleteLocalData() function. --- libtransmission/torrent.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libtransmission/torrent.c b/libtransmission/torrent.c index a8bd38fb1..5bebf2337 100644 --- a/libtransmission/torrent.c +++ b/libtransmission/torrent.c @@ -2765,11 +2765,8 @@ deleteLocalData (tr_torrent * tor, tr_fileFunc func) if (filename != NULL) { char * target = tr_buildPath (tmpdir, tor->info.files[f].name, NULL); - char * target_dir = tr_dirname (target); - tr_mkdirp (target_dir, 0777); - rename (filename, target); + tr_moveFile (filename, target, NULL); tr_ptrArrayAppend (&files, target); - tr_free (target_dir); tr_free (filename); } }