From: Jordan Lee Date: Thu, 31 Jan 2013 18:20:37 +0000 (+0000) Subject: (libT) fix a filesystem sync issue in rename-test, reported by Lacrocivious X-Git-Tag: 2.80~160 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=500aa4569f019bdd5e8d635cc4fdbd4ef17f41ba;p=transmission (libT) fix a filesystem sync issue in rename-test, reported by Lacrocivious --- diff --git a/libtransmission/rename-test.c b/libtransmission/rename-test.c index 4f0300359..c2d60a6d2 100644 --- a/libtransmission/rename-test.c +++ b/libtransmission/rename-test.c @@ -409,12 +409,17 @@ test_multifile_torrent (void) remove (str); tmp = tr_dirname (str); remove (tmp); + sync (); tr_free (tmp); tr_free (str); verify_and_block_until_done (tor); testFileExistsAndConsistsOfThisString (tor, 0, expected_contents[0]); - check (tr_torrentFindFile (tor, 1) == NULL); - check (tr_torrentFindFile (tor, 2) == NULL); + for (i=1; i<=2; ++i) + { + str = tr_torrentFindFile (tor, i); + check_streq (NULL, str); + tr_free (str); + } testFileExistsAndConsistsOfThisString (tor, 3, expected_contents[3]); /* rename a branch... */