From e2704bd823e44000b81e42fc05b58b8d0bc9ddda Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Mon, 9 Mar 2009 15:10:26 +0000 Subject: 2009-03-10 Tatsuhiro Tsujikawa FileEntry::getPath() contains store(top level) directory to simplify path handling operation. In the previous implementation, store directory is concatenated to FileEntry::getPath() in DownloadContext. * src/BtDependency.cc * src/BtPostDownloadHandler.cc * src/CopyDiskAdaptor.cc * src/DefaultBtContext.cc * src/DirectDiskAdaptor.cc * src/FileEntry.cc * src/FileEntry.h * src/FtpNegotiationCommand.cc * src/HttpResponse.cc * src/HttpResponseCommand.cc * src/Metalink2RequestGroup.cc * src/MultiDiskAdaptor.cc * src/MultiDiskAdaptor.h * src/MultiFileAllocationIterator.cc * src/RequestGroup.cc * src/SingleFileDownloadContext.cc * src/SingleFileDownloadContext.h * src/download_helper.cc * test/BtDependencyTest.cc * test/CopyDiskAdaptorTest.cc * test/DefaultBtContextTest.cc * test/DefaultBtProgressInfoFileTest.cc * test/DirectDiskAdaptorTest.cc * test/DownloadHelperTest.cc * test/FileEntryTest.cc * test/MultiDiskAdaptorTest.cc * test/MultiFileAllocationIteratorTest.cc * test/RequestGroupTest.cc * test/SingleFileDownloadContextTest.cc --- test/FileEntryTest.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'test/FileEntryTest.cc') diff --git a/test/FileEntryTest.cc b/test/FileEntryTest.cc index 5b6465bc..5c3f70f6 100644 --- a/test/FileEntryTest.cc +++ b/test/FileEntryTest.cc @@ -19,17 +19,16 @@ CPPUNIT_TEST_SUITE_REGISTRATION( FileEntryTest ); void FileEntryTest::testSetupDir() { - std::string topDir = "/tmp"; - std::string dir = "aria2-FileEntryTest-testSetupDir"; + std::string dir = "/tmp/aria2-FileEntryTest-testSetupDir"; std::string filename = "filename"; - std::string path = topDir+"/"+dir+"/"+filename; - File d(topDir+"/"+dir); + std::string path = dir+"/"+filename; + File d(dir); if(d.exists()) { CPPUNIT_ASSERT(d.remove()); } CPPUNIT_ASSERT(!d.exists()); - FileEntry fileEntry(dir+"/"+filename, 0, 0); - fileEntry.setupDir(topDir); + FileEntry fileEntry(path, 0, 0); + fileEntry.setupDir(); CPPUNIT_ASSERT(d.isDir()); File f(path); CPPUNIT_ASSERT(!f.exists()); -- cgit