diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-07-26 15:12:54 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-07-28 13:51:29 +0200 |
commit | b6f166c4ed98f94bdd2cc82885d61173a101abfd (patch) | |
tree | c6b75cf2efc98624760050173219e977f8620608 /tests/link | |
parent | 098559ca3552ebd8f80a6d28254f4fa58913b751 (diff) |
Redesign path to store trailing slash for directories
Diffstat (limited to 'tests/link')
-rw-r--r-- | tests/link/driver.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/link/driver.cxx b/tests/link/driver.cxx index a32a8dc..4a4a00f 100644 --- a/tests/link/driver.cxx +++ b/tests/link/driver.cxx @@ -43,8 +43,10 @@ link_file (const path& target, const path& link, bool hard, bool check_content) #ifndef _WIN32 static bool -link_dir ( - const dir_path& target, const dir_path& link, bool hard, bool check_content) +link_dir (const dir_path& target, + const dir_path& link, + bool hard, + bool check_content) { try { @@ -53,8 +55,9 @@ link_dir ( else mksymlink (target, link); } - catch (const system_error&) + catch (const system_error& e) { + //cerr << e.what () << endl; return false; } @@ -62,6 +65,7 @@ link_dir ( return true; dir_path tp (target.absolute () ? target : link.directory () / target); + set<pair<entry_type, path>> te; for (const dir_entry& de: dir_iterator (tp)) te.emplace (de.ltype (), de.path ()); @@ -112,7 +116,7 @@ main () // Create the file symlink using an unexistent file path. // - assert (link_file (fp / path ("a"), td / path ("sa"), false, false)); + assert (link_file (fp + "-a", td / path ("sa"), false, false)); // Prepare the target directory. // |