forked from premiere/premiere-libtorrent
merged changes from RC_1_0
This commit is contained in:
parent
20b4608c38
commit
ca3c1620bd
|
@ -941,6 +941,7 @@ namespace libtorrent
|
||||||
std::string complete(std::string const& f)
|
std::string complete(std::string const& f)
|
||||||
{
|
{
|
||||||
if (is_complete(f)) return f;
|
if (is_complete(f)) return f;
|
||||||
|
if (f == ".") return current_working_directory();
|
||||||
return combine_path(current_working_directory(), f);
|
return combine_path(current_working_directory(), f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -153,6 +153,8 @@ int test_main()
|
||||||
|
|
||||||
// test path functions
|
// test path functions
|
||||||
TEST_EQUAL(combine_path("test1/", "test2"), "test1/test2");
|
TEST_EQUAL(combine_path("test1/", "test2"), "test1/test2");
|
||||||
|
TEST_EQUAL(combine_path("test1", "."), "test1");
|
||||||
|
TEST_EQUAL(combine_path(".", "test1"), "test1");
|
||||||
#ifdef TORRENT_WINDOWS
|
#ifdef TORRENT_WINDOWS
|
||||||
TEST_EQUAL(combine_path("test1\\", "test2"), "test1\\test2");
|
TEST_EQUAL(combine_path("test1\\", "test2"), "test1\\test2");
|
||||||
TEST_EQUAL(combine_path("test1", "test2"), "test1\\test2");
|
TEST_EQUAL(combine_path("test1", "test2"), "test1\\test2");
|
||||||
|
@ -239,6 +241,8 @@ int test_main()
|
||||||
TEST_EQUAL(is_complete(""), false);
|
TEST_EQUAL(is_complete(""), false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
TEST_EQUAL(complete("."), current_working_directory());
|
||||||
|
|
||||||
// test split_string
|
// test split_string
|
||||||
|
|
||||||
char const* tags[10];
|
char const* tags[10];
|
||||||
|
|
Loading…
Reference in New Issue