• R/O
  • SSH
  • HTTPS

hamigaki: 提交


Commit MetaInfo

修訂1609 (tree)
時間2008-04-24 23:38:48
作者hamigaki

Log Message

changed not to use Boost.FileSystem deprecated functions

Change Summary

差異

--- hamigaki/trunk/libs/archivers/example/zip.cpp (revision 1608)
+++ hamigaki/trunk/libs/archivers/example/zip.cpp (revision 1609)
@@ -1,6 +1,6 @@
11 // zip.cpp: a simple ZIP compressing program
22
3-// Copyright Takeshi Mouri 2006, 2007.
3+// Copyright Takeshi Mouri 2006-2008.
44 // Distributed under the Boost Software License, Version 1.0.
55 // (See accompanying file LICENSE_1_0.txt or copy at
66 // http://www.boost.org/LICENSE_1_0.txt)
@@ -34,7 +34,6 @@
3434 }
3535
3636 std::setlocale(LC_ALL, "");
37- fs::path::default_name_check(fs::no_check);
3837
3938 // file_descriptor_sink supports 64bit offset
4039 ar::basic_zip_file_sink<io_ex::file_descriptor_sink>
@@ -83,7 +82,7 @@
8382 {
8483 io::copy(
8584 io_ex::file_descriptor_source(
86- head.path.native_file_string(),
85+ head.path.file_string(),
8786 std::ios_base::binary),
8887 zip
8988 );
@@ -94,7 +93,7 @@
9493
9594 io::copy(
9695 io_ex::file_descriptor_source(
97- head.path.native_file_string(),
96+ head.path.file_string(),
9897 std::ios_base::binary),
9998 zip
10099 );
--- hamigaki/trunk/libs/archivers/example/lha.cpp (revision 1608)
+++ hamigaki/trunk/libs/archivers/example/lha.cpp (revision 1609)
@@ -1,6 +1,6 @@
11 // lha.cpp: a simple LZH compressing program
22
3-// Copyright Takeshi Mouri 2006, 2007.
3+// Copyright Takeshi Mouri 2006-2008.
44 // Distributed under the Boost Software License, Version 1.0.
55 // (See accompanying file LICENSE_1_0.txt or copy at
66 // http://www.boost.org/LICENSE_1_0.txt)
@@ -38,7 +38,6 @@
3838 }
3939
4040 std::setlocale(LC_ALL, "");
41- fs::path::default_name_check(fs::no_check);
4241
4342 // file_descriptor_sink supports 64bit offset
4443 ar::basic_lzh_file_sink<io_ex::file_descriptor_sink>
@@ -97,7 +96,7 @@
9796 {
9897 io::copy(
9998 io_ex::file_descriptor_source(
100- head.path.native_file_string(),
99+ head.path.file_string(),
101100 std::ios_base::binary),
102101 lzh
103102 );
@@ -108,7 +107,7 @@
108107
109108 io::copy(
110109 io_ex::file_descriptor_source(
111- head.path.native_file_string(),
110+ head.path.file_string(),
112111 std::ios_base::binary),
113112 lzh
114113 );
--- hamigaki/trunk/libs/archivers/example/unzip.cpp (revision 1608)
+++ hamigaki/trunk/libs/archivers/example/unzip.cpp (revision 1609)
@@ -1,4 +1,4 @@
1-// simple_unzip.cpp: a simple ZIP decompressing program
1+// unzip.cpp: a simple ZIP decompressing program
22
33 // Copyright Takeshi Mouri 2006-2008.
44 // Distributed under the Boost Software License, Version 1.0.
@@ -44,7 +44,6 @@
4444 }
4545
4646 std::setlocale(LC_ALL, "");
47- fs::path::default_name_check(fs::no_check);
4847
4948 ar::zip_file_source zip(argv[1]);
5049
@@ -71,7 +70,7 @@
7170 io::copy(
7271 zip,
7372 io_ex::file_sink(
74- head.path.native_file_string(), std::ios_base::binary)
73+ head.path.file_string(), std::ios_base::binary)
7574 );
7675 }
7776
--- hamigaki/trunk/libs/archivers/example/unlha.cpp (revision 1608)
+++ hamigaki/trunk/libs/archivers/example/unlha.cpp (revision 1609)
@@ -1,4 +1,4 @@
1-// simple_unlha.cpp: a simple LZH decompressing program
1+// unlha.cpp: a simple LZH decompressing program
22
33 // Copyright Takeshi Mouri 2006-2008.
44 // Distributed under the Boost Software License, Version 1.0.
@@ -44,7 +44,6 @@
4444 }
4545
4646 std::setlocale(LC_ALL, "");
47- fs::path::default_name_check(fs::no_check);
4847
4948 ar::lzh_file_source lzh(argv[1]);
5049
@@ -71,7 +70,7 @@
7170 io::copy(
7271 lzh,
7372 io_ex::file_sink(
74- head.path.native_file_string(), std::ios_base::binary)
73+ head.path.file_string(), std::ios_base::binary)
7574 );
7675 }
7776
--- hamigaki/trunk/libs/archivers/example/extract.cpp (revision 1608)
+++ hamigaki/trunk/libs/archivers/example/extract.cpp (revision 1609)
@@ -270,7 +270,6 @@
270270 }
271271
272272 std::setlocale(LC_ALL, "");
273- fs::path::default_name_check(fs::no_check);
274273
275274 std::auto_ptr<extractor_base> ext_ptr;
276275 const std::string filename(argv[1]);
@@ -382,7 +381,7 @@
382381 io::copy(
383382 boost::ref(*ext_ptr),
384383 io_ex::file_sink(
385- e.path.native_file_string(), std::ios_base::binary),
384+ e.path.file_string(), std::ios_base::binary),
386385 1024*8
387386 );
388387 }
--- hamigaki/trunk/libs/archivers/example/archive.cpp (revision 1608)
+++ hamigaki/trunk/libs/archivers/example/archive.cpp (revision 1609)
@@ -1,6 +1,6 @@
11 // archive.cpp: multi-format archiver
22
3-// Copyright Takeshi Mouri 2006, 2007.
3+// Copyright Takeshi Mouri 2006-2008.
44 // Distributed under the Boost Software License, Version 1.0.
55 // (See accompanying file LICENSE_1_0.txt or copy at
66 // http://www.boost.org/LICENSE_1_0.txt)
@@ -289,7 +289,6 @@
289289 }
290290
291291 std::setlocale(LC_ALL, "");
292- fs::path::default_name_check(fs::no_check);
293292
294293 std::auto_ptr<archiver_base> arc_ptr;
295294 const std::string filename(argv[1]);
@@ -418,7 +417,7 @@
418417 {
419418 io::copy(
420419 io_ex::file_source(
421- e.path.native_file_string(),
420+ e.path.file_string(),
422421 std::ios_base::binary),
423422 boost::ref(*arc_ptr)
424423 );
@@ -429,7 +428,7 @@
429428
430429 io::copy(
431430 io_ex::file_source(
432- e.path.native_file_string(),
431+ e.path.file_string(),
433432 std::ios_base::binary),
434433 boost::ref(*arc_ptr)
435434 );
--- hamigaki/trunk/libs/archivers/example/delete_zip.cpp (revision 1608)
+++ hamigaki/trunk/libs/archivers/example/delete_zip.cpp (revision 1609)
@@ -1,6 +1,6 @@
11 // delete_zip.cpp: delete the specified entry from the ZIP file
22
3-// Copyright Takeshi Mouri 2006, 2007.
3+// Copyright Takeshi Mouri 2006-2008.
44 // Distributed under the Boost Software License, Version 1.0.
55 // (See accompanying file LICENSE_1_0.txt or copy at
66 // http://www.boost.org/LICENSE_1_0.txt)
@@ -52,7 +52,6 @@
5252 }
5353
5454 std::setlocale(LC_ALL, "");
55- fs::path::default_name_check(fs::no_check);
5655
5756 fs::path zip_name(argv[1], fs::native);
5857 const fs::path& bak_name = change_extension(zip_name, ".bak");
@@ -61,8 +60,8 @@
6160 fs::path del_name(argv[2], fs::native);
6261
6362 {
64- ar::raw_zip_file_source src(bak_name.native_file_string());
65- ar::raw_zip_file_sink sink(zip_name.native_file_string());
63+ ar::raw_zip_file_source src(bak_name.file_string());
64+ ar::raw_zip_file_sink sink(zip_name.file_string());
6665
6766 while (src.next_entry())
6867 {
--- hamigaki/trunk/libs/archivers/example/tar.cpp (revision 1608)
+++ hamigaki/trunk/libs/archivers/example/tar.cpp (revision 1609)
@@ -1,6 +1,6 @@
11 // tar.cpp: a simple tar archiver
22
3-// Copyright Takeshi Mouri 2006, 2007.
3+// Copyright Takeshi Mouri 2006-2008.
44 // Distributed under the Boost Software License, Version 1.0.
55 // (See accompanying file LICENSE_1_0.txt or copy at
66 // http://www.boost.org/LICENSE_1_0.txt)
@@ -41,7 +41,6 @@
4141 }
4242
4343 std::setlocale(LC_ALL, "");
44- fs::path::default_name_check(fs::no_check);
4544
4645 // file_descriptor_sink supports 64bit offset
4746 ar::basic_tar_file_sink<io_ex::file_descriptor_sink>
@@ -102,7 +101,7 @@
102101 {
103102 io::copy(
104103 io_ex::file_descriptor_source(
105- head.path.native_file_string(),
104+ head.path.file_string(),
106105 std::ios_base::binary),
107106 tar
108107 );
--- hamigaki/trunk/libs/archivers/example/delete_lha.cpp (revision 1608)
+++ hamigaki/trunk/libs/archivers/example/delete_lha.cpp (revision 1609)
@@ -1,6 +1,6 @@
11 // delete_lha.cpp: delete the specified entry from the LZH file
22
3-// Copyright Takeshi Mouri 2006, 2007.
3+// Copyright Takeshi Mouri 2006-2008.
44 // Distributed under the Boost Software License, Version 1.0.
55 // (See accompanying file LICENSE_1_0.txt or copy at
66 // http://www.boost.org/LICENSE_1_0.txt)
@@ -52,7 +52,6 @@
5252 }
5353
5454 std::setlocale(LC_ALL, "");
55- fs::path::default_name_check(fs::no_check);
5655
5756 fs::path lzh_name(argv[1], fs::native);
5857 const fs::path& bak_name = change_extension(lzh_name, ".bak");
@@ -61,8 +60,8 @@
6160 fs::path del_name(argv[2], fs::native);
6261
6362 {
64- ar::raw_lzh_file_source src(bak_name.native_file_string());
65- ar::raw_lzh_file_sink sink(lzh_name.native_file_string());
63+ ar::raw_lzh_file_source src(bak_name.file_string());
64+ ar::raw_lzh_file_sink sink(lzh_name.file_string());
6665
6766 while (src.next_entry())
6867 {
--- hamigaki/trunk/libs/archivers/example/untar.cpp (revision 1608)
+++ hamigaki/trunk/libs/archivers/example/untar.cpp (revision 1609)
@@ -1,4 +1,4 @@
1-// simple_untar.cpp: a simple ZIP decompressing program
1+// untar.cpp: a simple ZIP decompressing program
22
33 // Copyright Takeshi Mouri 2006-2008.
44 // Distributed under the Boost Software License, Version 1.0.
@@ -39,7 +39,6 @@
3939 }
4040
4141 std::setlocale(LC_ALL, "");
42- fs::path::default_name_check(fs::no_check);
4342
4443 ar::tar_file_source tar(argv[1]);
4544
@@ -80,7 +79,7 @@
8079 io::copy(
8180 tar,
8281 io_ex::file_sink(
83- head.path.native_file_string(), std::ios_base::binary)
82+ head.path.file_string(), std::ios_base::binary)
8483 );
8584 }
8685
--- hamigaki/trunk/libs/archivers/example/iso.cpp (revision 1608)
+++ hamigaki/trunk/libs/archivers/example/iso.cpp (revision 1609)
@@ -1,6 +1,6 @@
11 // iso.cpp: a simple ISO image archiver program
22
3-// Copyright Takeshi Mouri 2006, 2007.
3+// Copyright Takeshi Mouri 2006-2008.
44 // Distributed under the Boost Software License, Version 1.0.
55 // (See accompanying file LICENSE_1_0.txt or copy at
66 // http://www.boost.org/LICENSE_1_0.txt)
@@ -31,7 +31,6 @@
3131 }
3232
3333 std::setlocale(LC_ALL, "");
34- fs::path::default_name_check(fs::no_check);
3534
3635 ar::iso_file_sink iso(argv[1]);
3736
@@ -89,7 +88,7 @@
8988 {
9089 io::copy(
9190 io_ex::file_source(
92- head.path.native_file_string(),
91+ head.path.file_string(),
9392 std::ios_base::binary),
9493 iso
9594 );
--- hamigaki/trunk/libs/archivers/example/append_lha.cpp (revision 1608)
+++ hamigaki/trunk/libs/archivers/example/append_lha.cpp (revision 1609)
@@ -1,6 +1,6 @@
11 // append_lha.cpp: append files to the existing LZH file
22
3-// Copyright Takeshi Mouri 2006, 2007.
3+// Copyright Takeshi Mouri 2006-2008.
44 // Distributed under the Boost Software License, Version 1.0.
55 // (See accompanying file LICENSE_1_0.txt or copy at
66 // http://www.boost.org/LICENSE_1_0.txt)
@@ -39,7 +39,6 @@
3939 }
4040
4141 std::setlocale(LC_ALL, "");
42- fs::path::default_name_check(fs::no_check);
4342
4443 io_ex::file_sink file;
4544 try
@@ -108,7 +107,7 @@
108107 {
109108 io::copy(
110109 io_ex::file_source(
111- head.path.native_file_string(),
110+ head.path.file_string(),
112111 std::ios_base::binary),
113112 lzh
114113 );
@@ -119,7 +118,7 @@
119118
120119 io::copy(
121120 io_ex::file_source(
122- head.path.native_file_string(),
121+ head.path.file_string(),
123122 std::ios_base::binary),
124123 lzh
125124 );
--- hamigaki/trunk/libs/archivers/example/uniso.cpp (revision 1608)
+++ hamigaki/trunk/libs/archivers/example/uniso.cpp (revision 1609)
@@ -1,6 +1,6 @@
11 // uniso.cpp: a simple ISO image extractor program
22
3-// Copyright Takeshi Mouri 2007.
3+// Copyright Takeshi Mouri 2007, 2008.
44 // Distributed under the Boost Software License, Version 1.0.
55 // (See accompanying file LICENSE_1_0.txt or copy at
66 // http://www.boost.org/LICENSE_1_0.txt)
@@ -38,7 +38,6 @@
3838 }
3939
4040 std::setlocale(LC_ALL, "");
41- fs::path::default_name_check(fs::no_check);
4241
4342 ar::iso_file_source iso(argv[1]);
4443
@@ -80,7 +79,7 @@
8079 io::copy(
8180 iso,
8281 io_ex::file_sink(
83- head.path.native_file_string(), std::ios_base::binary)
82+ head.path.file_string(), std::ios_base::binary)
8483 );
8584 }
8685 }
--- hamigaki/trunk/libs/archivers/example/list_zip.cpp (revision 1608)
+++ hamigaki/trunk/libs/archivers/example/list_zip.cpp (revision 1609)
@@ -1,6 +1,6 @@
11 // list_zip.cpp: show the file list in the ZIP file
22
3-// Copyright Takeshi Mouri 2006, 2007.
3+// Copyright Takeshi Mouri 2006-2008.
44 // Distributed under the Boost Software License, Version 1.0.
55 // (See accompanying file LICENSE_1_0.txt or copy at
66 // http://www.boost.org/LICENSE_1_0.txt)
@@ -29,7 +29,6 @@
2929 }
3030
3131 std::setlocale(LC_ALL, "");
32- fs::path::default_name_check(fs::no_check);
3332
3433 // file_descriptor_source supports 64bit offset
3534 ar::basic_zip_file_source<io_ex::file_descriptor_source>
--- hamigaki/trunk/libs/bjam/test/glob_test.cpp (revision 1608)
+++ hamigaki/trunk/libs/bjam/test/glob_test.cpp (revision 1609)
@@ -1,6 +1,6 @@
11 // glob_test.cpp: test case for glob.hpp
22
3-// Copyright Takeshi Mouri 2007.
3+// Copyright Takeshi Mouri 2007, 2008.
44 // Distributed under the Boost Software License, Version 1.0.
55 // (See accompanying file LICENSE_1_0.txt or copy at
66 // http://www.boost.org/LICENSE_1_0.txt)
@@ -23,7 +23,7 @@
2323 bjam::string_list result;
2424 std::string expect;
2525
26- fs::path work = fs::current_path();
26+ fs::path work = fs::current_path<fs::path>();
2727
2828 #if defined(BOOST_WINDOWS)
2929 expect = hamigaki_root + "\\Jamfile.v2";
@@ -31,12 +31,12 @@
3131 expect = hamigaki_root + "/Jamfile.v2";
3232 #endif
3333
34- result = bjam::glob(work.native_directory_string(), hamigaki_root, "J*.v2");
34+ result = bjam::glob(work.directory_string(), hamigaki_root, "J*.v2");
3535 BOOST_CHECK(std::find(result.begin(),result.end(),expect) != result.end());
3636
3737
3838 result = bjam::glob(
39- work.native_directory_string(), hamigaki_root, "j*.v2", true);
39+ work.directory_string(), hamigaki_root, "j*.v2", true);
4040 BOOST_CHECK(std::find(result.begin(),result.end(),expect) != result.end());
4141
4242
@@ -45,7 +45,7 @@
4545 #else
4646 expect = "././Jamfile.v2";
4747 #endif
48- result = bjam::glob(work.native_directory_string(), "./.", "J*.v2");
48+ result = bjam::glob(work.directory_string(), "./.", "J*.v2");
4949 BOOST_CHECK(std::find(result.begin(),result.end(),expect) != result.end());
5050 }
5151
@@ -55,7 +55,7 @@
5555 std::string pattern;
5656 std::string expect;
5757
58- fs::path work = fs::current_path();
58+ fs::path work = fs::current_path<fs::path>();
5959
6060 pattern = hamigaki_root + "/libs/*/build/J*.v2";
6161 #if defined(BOOST_WINDOWS)
@@ -63,7 +63,7 @@
6363 #else
6464 expect = hamigaki_root + "/libs/bjam/build/Jamfile.v2";
6565 #endif
66- result = bjam::glob_recursive(work.native_directory_string(), pattern);
66+ result = bjam::glob_recursive(work.directory_string(), pattern);
6767 BOOST_CHECK(std::find(result.begin(),result.end(),expect) != result.end());
6868
6969
@@ -73,7 +73,7 @@
7373 #else
7474 expect = "././Jamfile.v2";
7575 #endif
76- result = bjam::glob_recursive(work.native_directory_string(), pattern);
76+ result = bjam::glob_recursive(work.directory_string(), pattern);
7777 BOOST_CHECK(std::find(result.begin(),result.end(),expect) != result.end());
7878 }
7979
--- hamigaki/trunk/libs/bjam/test/bjam_test.cpp (revision 1608)
+++ hamigaki/trunk/libs/bjam/test/bjam_test.cpp (revision 1609)
@@ -1,6 +1,6 @@
11 // bjam_test.cpp: test case for bjam_grammar
22
3-// Copyright Takeshi Mouri 2007.
3+// Copyright Takeshi Mouri 2007, 2008.
44 // Distributed under the Boost Software License, Version 1.0.
55 // (See accompanying file LICENSE_1_0.txt or copy at
66 // http://www.boost.org/LICENSE_1_0.txt)
@@ -457,7 +457,7 @@
457457
458458 std::string src;
459459 src += "include ";
460- src += algo::replace_all_copy(ph.native_file_string(), "\\", "\\\\");
460+ src += algo::replace_all_copy(ph.file_string(), "\\", "\\\\");
461461 src += " ;";
462462
463463 BOOST_CHECK(eval(ctx, src).empty());
@@ -469,7 +469,7 @@
469469
470470 fs::path ph(hamigaki_root, fs::native);
471471 ph /= "libs/bjam/test/back_trace_test.jam";
472- std::string filename = ph.native_file_string();
472+ std::string filename = ph.file_string();
473473
474474 std::string src;
475475 src += "include ";
--- hamigaki/trunk/libs/bjam/src/search.cpp (revision 1608)
+++ hamigaki/trunk/libs/bjam/src/search.cpp (revision 1609)
@@ -1,6 +1,6 @@
11 // search.cpp: search the target file
22
3-// Copyright Takeshi Mouri 2007.
3+// Copyright Takeshi Mouri 2007, 2008.
44 // Distributed under the Boost Software License, Version 1.0.
55 // (See accompanying file LICENSE_1_0.txt or copy at
66 // http://www.boost.org/LICENSE_1_0.txt)
@@ -80,7 +80,7 @@
8080 compo.root.clear();
8181 fs::path ph(make_path(compo), fs::native);
8282 fs::path work(ctx.working_directory(), fs::native);
83- filename = fs::complete(ph, work).native_file_string();
83+ filename = fs::complete(ph, work).file_string();
8484 }
8585
8686 call_bind_rule(ctx, name, filename);
--- hamigaki/trunk/libs/bjam/src/bjam_context.cpp (revision 1608)
+++ hamigaki/trunk/libs/bjam/src/bjam_context.cpp (revision 1609)
@@ -159,7 +159,7 @@
159159 } // namespace
160160
161161 context::context()
162- : working_directory_(fs::current_path().native_directory_string())
162+ : working_directory_(fs::current_path<fs::path>().directory_string())
163163 , os_(&std::cout)
164164 {
165165 frames_.push_back(frame(root_module_));
--- hamigaki/trunk/libs/bjam/src/glob.cpp (revision 1608)
+++ hamigaki/trunk/libs/bjam/src/glob.cpp (revision 1609)
@@ -1,6 +1,6 @@
11 // glob.cpp: glob for bjam
22
3-// Copyright Takeshi Mouri 2007.
3+// Copyright Takeshi Mouri 2007, 2008.
44 // Distributed under the Boost Software License, Version 1.0.
55 // (See accompanying file LICENSE_1_0.txt or copy at
66 // http://www.boost.org/LICENSE_1_0.txt)
@@ -97,7 +97,7 @@
9797 const std::string& ph = make_path(compo);
9898
9999 string_list tmp;
100- if (fs::exists(fs::complete(fs::path(ph, fs::no_check), work)))
100+ if (fs::exists(fs::complete(ph, work)))
101101 tmp.push_back(ph);
102102 return tmp;
103103 }
@@ -114,7 +114,7 @@
114114 compo.base = ptn;
115115
116116 const std::string& new_dir = make_path(compo);
117- fs::path ph(new_dir, fs::no_check);
117+ fs::path ph(new_dir);
118118 ph = fs::complete(ph, work);
119119
120120 if (fs::is_directory(ph))
--- hamigaki/trunk/hamigaki/archivers/detail/ustar_file_source_impl.hpp (revision 1608)
+++ hamigaki/trunk/hamigaki/archivers/detail/ustar_file_source_impl.hpp (revision 1609)
@@ -91,8 +91,6 @@
9191
9292 inline tar::header read_tar_header(const char* block)
9393 {
94- using namespace boost::filesystem;
95-
9694 tar::raw_header raw;
9795 hamigaki::binary_read(block, raw);
9896
@@ -102,8 +100,8 @@
102100 if (!detail::is_valid(raw.uname) || !detail::is_valid(raw.gname))
103101 throw BOOST_IOSTREAMS_FAILURE("invalid tar header");
104102
105- const path name(detail::read_string(raw.name), no_check);
106- const path prefix(detail::read_string(raw.prefix), no_check);
103+ const boost::filesystem::path name(detail::read_string(raw.name));
104+ const boost::filesystem::path prefix(detail::read_string(raw.prefix));
107105
108106 tar::header head;
109107
--- hamigaki/trunk/hamigaki/archivers/detail/sl_components_parser.hpp (revision 1608)
+++ hamigaki/trunk/hamigaki/archivers/detail/sl_components_parser.hpp (revision 1609)
@@ -1,6 +1,6 @@
11 // sl_components_parser.hpp: IEEE P1282 "SL" components parser
22
3-// Copyright Takeshi Mouri 2007.
3+// Copyright Takeshi Mouri 2007, 2008.
44 // Distributed under the Boost Software License, Version 1.0.
55 // (See accompanying file LICENSE_1_0.txt or copy at
66 // http://www.boost.org/LICENSE_1_0.txt)
@@ -66,8 +66,6 @@
6666
6767 std::size_t parse_components(const char* s, std::size_t size)
6868 {
69- using boost::filesystem::no_check;
70-
7169 if (size < 2)
7270 {
7371 bad_ = true;
@@ -122,7 +120,7 @@
122120
123121 if ((flags & continue_) == 0)
124122 {
125- ph_ /= boost::filesystem::path(leaf_, no_check);
123+ ph_ /= leaf_;
126124 leaf_.clear();
127125 }
128126 }
--- hamigaki/trunk/hamigaki/archivers/detail/raw_cpio_file_sink_impl.hpp (revision 1608)
+++ hamigaki/trunk/hamigaki/archivers/detail/raw_cpio_file_sink_impl.hpp (revision 1609)
@@ -1,6 +1,6 @@
11 // raw_cpio_file_sink_impl.hpp: raw cpio file sink implementation
22
3-// Copyright Takeshi Mouri 2006, 2007.
3+// Copyright Takeshi Mouri 2006-2008.
44 // Distributed under the Boost Software License, Version 1.0.
55 // (See accompanying file LICENSE_1_0.txt or copy at
66 // http://www.boost.org/LICENSE_1_0.txt)
@@ -269,12 +269,10 @@
269269
270270 void close_archive()
271271 {
272- using namespace boost::filesystem;
273-
274272 cpio::header head;
275273 head.format = format_;
276274 head.permissions = 0;
277- head.path = path("TRAILER!!!", no_check);
275+ head.path = "TRAILER!!!";
278276 create_entry(head);
279277
280278 boost::iostreams::close(sink_, BOOST_IOS::out);
--- hamigaki/trunk/hamigaki/archivers/detail/tar_file_sink_impl.hpp (revision 1608)
+++ hamigaki/trunk/hamigaki/archivers/detail/tar_file_sink_impl.hpp (revision 1609)
@@ -94,8 +94,6 @@
9494
9595 void create_entry(const tar::header& head)
9696 {
97- using namespace boost::filesystem;
98-
9997 tar::header local = head;
10098
10199 std::string name = head.path.string();
@@ -118,7 +116,7 @@
118116 ex += detail::make_ex_header_recoed("path", long_name);
119117
120118 long_name.resize(tar::raw_header::name_size);
121- local.path = path(long_name, no_check);
119+ local.path = long_name;
122120 }
123121
124122 if ((head.uid < 0) || (head.uid > tar::raw_header::max_uid))
@@ -171,7 +169,7 @@
171169 ex += detail::make_ex_header_recoed("linkpath", long_link);
172170
173171 long_link.resize(tar::raw_header::name_size);
174- local.link_path = path(long_link, no_check);
172+ local.link_path = long_link;
175173 }
176174
177175 if (detail::is_non_ascii(head.user_name))
@@ -215,7 +213,7 @@
215213 ustar_.close();
216214
217215 long_name.resize(tar::raw_header::name_size);
218- local.path = path(long_name, no_check);
216+ local.path = long_name;
219217 }
220218
221219 if (long_link.size() > tar::raw_header::name_size)
@@ -232,7 +230,7 @@
232230 ustar_.close();
233231
234232 long_link.resize(tar::raw_header::name_size);
235- local.link_path = path(long_link, no_check);
233+ local.link_path = long_link;
236234 }
237235 }
238236
--- hamigaki/trunk/hamigaki/archivers/detail/raw_cpio_file_source_impl.hpp (revision 1608)
+++ hamigaki/trunk/hamigaki/archivers/detail/raw_cpio_file_source_impl.hpp (revision 1609)
@@ -1,6 +1,6 @@
11 // raw_cpio_file_source_impl.hpp: raw cpio file source implementation
22
3-// Copyright Takeshi Mouri 2006, 2007.
3+// Copyright Takeshi Mouri 2006-2008.
44 // Distributed under the Boost Software License, Version 1.0.
55 // (See accompanying file LICENSE_1_0.txt or copy at
66 // http://www.boost.org/LICENSE_1_0.txt)
@@ -132,14 +132,12 @@
132132
133133 bool next_entry()
134134 {
135- using namespace boost::filesystem;
136-
137135 if (boost::uint32_t rest = header_.file_size - pos_)
138136 iostreams::skip(src_, rest);
139137 pos_ = 0;
140138
141139 header_ = read_header();
142- if (header_.path == path("TRAILER!!!", no_check))
140+ if (header_.path == "TRAILER!!!")
143141 return false;
144142 else if (header_.is_symlink())
145143 {
@@ -146,7 +144,7 @@
146144 boost::scoped_array<char> buf(new char[header_.file_size+1]);
147145 this->read(buf.get(), header_.file_size);
148146 buf[header_.file_size] = '\0';
149- header_.link_path = path(buf.get(), no_check);
147+ header_.link_path = buf.get();
150148
151149 pos_ = 0;
152150 header_.file_size = 0;
@@ -179,8 +177,6 @@
179177
180178 cpio::header read_header()
181179 {
182- using namespace boost::filesystem;
183-
184180 cpio::header head;
185181 std::size_t name_size = 0;
186182
@@ -227,7 +223,7 @@
227223
228224 boost::scoped_array<char> buf(new char[name_size]);
229225 iostreams::blocking_read(src_, buf.get(), name_size);
230- head.path = path(buf.get(), no_check);
226+ head.path = buf.get();
231227
232228 return head;
233229 }
--- hamigaki/trunk/hamigaki/archivers/detail/tar_file_source_impl.hpp (revision 1608)
+++ hamigaki/trunk/hamigaki/archivers/detail/tar_file_source_impl.hpp (revision 1609)
@@ -1,6 +1,6 @@
11 // tar_file_source_impl.hpp: POSIX tar file source implementation
22
3-// Copyright Takeshi Mouri 2006, 2007.
3+// Copyright Takeshi Mouri 2006-2008.
44 // Distributed under the Boost Software License, Version 1.0.
55 // (See accompanying file LICENSE_1_0.txt or copy at
66 // http://www.boost.org/LICENSE_1_0.txt)
@@ -175,8 +175,6 @@
175175
176176 boost::filesystem::path read_long_link()
177177 {
178- using namespace boost::filesystem;
179-
180178 std::string buf;
181179
182180 boost::iostreams::copy(
@@ -186,13 +184,11 @@
186184 if (!buf.empty() && (*(buf.rbegin()) == '\0'))
187185 buf.resize(buf.size()-1);
188186
189- return path(buf, no_check);
187+ return buf;
190188 }
191189
192190 void read_extended_header(tar_ex_header& ext)
193191 {
194- using namespace boost::filesystem;
195-
196192 boost::iostreams::stream<
197193 boost::reference_wrapper<ustar_type>
198194 > is(boost::ref(ustar_));
@@ -224,7 +220,7 @@
224220 const char* end = beg + (size - 1);
225221
226222 if (key == "path")
227- ext.path = path(beg, no_check);
223+ ext.path = beg;
228224 else if (key == "uid")
229225 ext.uid = hamigaki::from_dec<boost::intmax_t>(beg, end);
230226 else if (key == "gid")
@@ -238,7 +234,7 @@
238234 else if (key == "ctime")
239235 ext.change_time = detail::to_timestamp(beg, end);
240236 else if (key == "linkpath")
241- ext.link_path = path(beg, no_check);
237+ ext.link_path = beg;
242238 else if (key == "uname")
243239 ext.user_name = beg;
244240 else if (key == "gname")
Show on old repository browser