Commit Graph

219 Commits

Author SHA1 Message Date
Beman
732609a2da Change member normal() and relative() to non-member lexically_normal() and lexically_relative(). See doc/relative_proposal.html#Add-lexical-functions-as-non-members for rationale. 2015-08-23 09:33:21 -04:00
Beman
c739cee694 Apply normal() to weakly_canonical results, but only when know to be needed or it is not known if it may be needed. 2015-08-19 08:43:36 -04:00
Beman
cb11081a7d Finish initial proposed wording section of relative_proposal.html. Drive-by tweaks to other stuff. Add example/directory_symlink_parent_resolution.cpp, include/boost/filesystem/string_file.hpp, and related infrastructure. 2015-08-12 17:26:03 -04:00
Beman
a7ac4c088f Add relative_test to Jamfile, fix Cygwin/GCC C++03 enum constant usage error. 2015-08-10 08:09:48 -04:00
Beman
7d6429554a Bring operational functions weakly_canonical() and relative() up to production quality: move implementations to operations.cpp, add error handling, replace tail recursion with iteration, rename weak_canonical to weakly_canonical. The weak_canonical name grated on me every type I used it. 2015-08-10 07:10:59 -04:00
Beman
34dd2c7718 Add a new path member function: "path normal() const;" and change the old deprecated normalize() non-const function to be implemented in terms of the new function. The implementation remains the same, except for returning by value rather than modifying in place. Motivation: Jamie Alsop has identified removal of redundant .. and . elements (i.e. normalization) as a need closely related to the relative path functionality requested by numerous Boost issue requests, the C++ LWG, and NB comments to the Filesystem TS. Given that both lexical and operational relative functionality is needed, there is less risk in providing a well-documented path::normal() lexical function. 2015-08-08 16:29:44 -04:00
Beman
9706dbb9b1 Revert "Change the name of path::relative to path::relative_to to distinguish it a bit from path::relative_path."
This reverts commit d5fb8323f8.

Leave possible renaming for bikeshed discussions. KISS.
2015-08-08 05:44:30 -04:00
Beman
d5fb8323f8 Change the name of path::relative to path::relative_to to distinguish it a bit from path::relative_path. 2015-08-07 16:50:47 -04:00
Beman
6da5f657fb Remove lexically_relative() free function. Add path::rel 2015-08-07 16:41:06 -04:00
Beman
dc794ea95b Merge branch 'feature/relative' into feature/relative2 2015-08-06 08:08:46 -04:00
Beman
95175ef819 Fix #11491, temp_directory_path doesn't return valid temp path on Android. 2015-07-22 11:13:06 -04:00
Adrien Destugues
3a02e54625 haiku: don't crash because of unsupported locale in libstdc++
See https://svn.boost.org/trac/boost/ticket/4688
We do the same as on Mac OS X and assume the filesystem uses utf-8.

Signed-off-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
2015-03-17 22:26:31 +00:00
Beman
424f09019c Rewrite Windows implementation of temp_directory_path() to (1) avoid GetTempPath() failure if path length > 130 (ticket #5300) and (2) provide a more sensible sequence of directories than provided by GetTempPath(), per boost list discussion "[filesystem] temp_directory_path() behavior on Windows". 2015-02-03 11:31:57 -05:00
Beman
06bddf3bc3 Rename typedef causing conflict with cygwin libraries. Fix refactoring missed in create_directory_symlink() that only affected cygwin tests. Clear gcc warning on cygwin tests. 2015-01-31 08:53:02 -05:00
Beman
01bbe99241 Refactor operations error handling helpers to (1) be less confusing and (2) fix a Windows problem where ::SetLastError() values were getting cleared before they could be retrieved by the error handling helpers. 2015-01-31 08:00:59 -05:00
Beman
c0b5754ab8 Fix ticket #10388, an occasional failure of temp_directory_path to deal correctly with the trailing separator. A path member function remove_trailing_separator() was added publicly since this may be useful to users. 2015-01-10 09:31:44 -05:00
Beman
bb5a0ff09d Clear warnings, including new warnings from VC++ 2015 preview. 2015-01-05 10:34:24 -05:00
Beman
e4e5bb8bf5 Fix ticket #6945 by applying patch from Kaylyn Bogle 2014-12-30 10:48:46 -05:00
Beman
704f4e328d Add a comment, and two BOOST_ASSERTs to detect the possible infinite loop described in ticket 4438 in case my analysis that the infinite loop will never happen is wrong. 2014-12-26 10:07:43 -05:00
Beman
4b4b3d8853 Add support for the Wind River VxWorks RTOS. Thanks to Rogerio Dos Santos. 2014-12-04 07:23:21 -05:00
Beman
490c2c3298 For all path_traits convert() and dispatch() functions provide two overloads, one with a "const codecvt_type&" argument, and one without. The overload without a codecvt argument calls path::codecvt() iff a conversion actually needs to be performed. Change all uses of path_traits convert() and dispatch() functions call the appropriate overload, rather than calling with path::codecvt() as a default. This limits the impact of locale("") initialization failures on Linux and other non-BSD POSIX systems to programs that actually depend on locale(""). It further ensures that exceptions thrown as a result of such failures occur after main() has started, and so can be caught. 2014-10-27 19:20:17 -04:00
Beman
1262a9f0d2 Fix C++03 compile failures for previous commit. 2014-10-24 11:46:50 -04:00
Beman
d57509c558 For compiled operational function detail::copy_file, pass detail::copy_options, a plain-old enum, rather than a BOOST_SCOPED_ENUM. We cannot pass a BOOST_SCOPED_ENUM to a compled function because it will result in an undefined reference if the library is compiled with -std=c++0x but the use is compiled in C++03 mode, or vise versa. Fixes tickets #6124, #6779, and #10038. 2014-10-24 10:58:42 -04:00
Beman
d5a2658d16 Move constant used only on Windows into Windows-specific helpers. Quiets clang warning message. 2014-09-04 09:24:20 -04:00
Beman
0041ea9646 Removed unused codecvt buffer size definitions long since moved to path_traits. Quiets clang warning. 2014-09-04 09:13:57 -04:00
Beman
76d209567f Refactor dot_path and dot_dot_path into functions, to prevent path constructor being called before main() starts. In theory that is harmless when path::value_type is the same as value_type of the ctor Source, but eliminating it simplifies reasoning about program correctness. 2014-08-22 11:31:42 -04:00
Beman
5b4e1b5580 Remove comments about mutexes. They are a distraction and less relevant as C++11 support becomes widespread. 2014-08-18 09:01:16 -04:00
Beman
35096ca056 Add 9219.cpp plus infrastructure and path.cpp logging 2014-08-17 10:55:01 -04:00
Beman
8ef629c906 Add __OpenBSD__ to the operating systems that "expect their string parameters to be in UTF-8 encoding and nothing else." Fixes #8352 2014-08-06 12:24:44 -04:00
Beman
750a82e20d Revert "Merge branch 'develop' of github.com:boostorg/filesystem into develop"
This reverts commit 4610afc49e, reversing
changes made to 6623bde4fe.
2014-08-05 09:16:57 -04:00
Beman
cc99cc6ceb Merge branch 'develop' into ts-develop 2014-07-31 17:24:34 -04:00
Beman
d83b8d9c6b Add ticket number. 2014-07-28 17:05:43 -04:00
Beman
91c4517a8c Add a useless initialization to quiet the Clang static analyzer, closing ticket #8954. 2014-07-28 16:47:25 -04:00
Beman
feffecb67f Remove testing residue, update copyright date. 2014-07-25 15:35:36 -04:00
Beman
d774842f39 Initial directory junction support. See release_history.html 2014-07-25 11:00:54 -04:00
Beman
038bce7e2d DTS: enum perms changed to enum class perms. Constant names have changed; synonyms provided. 2014-07-23 15:35:44 -04:00
Beman
99a94662b2 Merge branch 'develop' into ts-develop
Conflicts:
	include/boost/filesystem/operations.hpp
	test/operations_test.cpp
2014-07-22 20:55:58 -04:00
Beman
6ed4c4f6f7 Apply Christian Hammerl's fix for tickets 9683 and 10187. Supply test cases that should work for both POSIX and Windows. Tested with fix commented out to verify test cases do detect the problem. 2014-07-16 08:48:44 -04:00
Beman
fcb9600f91 Merge updates from Beman's Github repo. Unstable. 2014-07-09 14:47:13 -04:00
Beman
b1b1cea3c4 Rename relative to lexically_relative. Add semi_canonical() and relative(). 2014-05-29 15:42:11 -04:00
Beman
aa89af3387 Add test cases, correct typo 2014-05-05 14:23:59 -04:00
Beman
7cfff1821e initial implementation of relative(). 2014-05-05 11:54:27 -04:00
Beman Dawes
4b530071ab Merge pull request #1 from chris5287/patch-1
Update operations.cpp
2014-05-02 09:35:18 -04:00
Beman
0ddac9e962 Jürgen Hunold reports 'colon' const causes clang warning because it isn't used. Closes pull request #2 2014-05-01 17:34:47 -04:00
Chris Stylianou
e64d3f2dc3 Update operations.cpp
Added missing check for Solaris 10 which can declare __sun as well.
2014-01-03 02:31:58 +00:00
Antony Polukhin
f45977684a Apply trivial patch for Android compilation of Boost.Filesystem (refs #8706)
[SVN r84916]
2013-06-30 10:51:55 +00:00
Beman Dawes
7bb19f9604 Add FreeBSD support. Fix #4688
[SVN r83083]
2013-02-22 14:32:50 +00:00
Beman Dawes
f74de6c268 Revert mutex locking attempt. VC++ static builds failed in the C runtime because Microsoft staticly initializes some stuff that should be dynamically initialized.
[SVN r83034]
2013-02-19 21:09:10 +00:00
Beman Dawes
ce4dcdac91 Add locale_mutex to prevent race condition within path_locale(), either during initialization or use.
[SVN r83032]
2013-02-19 21:08:14 +00:00
Beman Dawes
5311e8139d After path.cpp mess cleanup but before adding mutex
[SVN r83031]
2013-02-19 21:07:52 +00:00