Opened 12 years ago
Closed 8 years ago
#5300 closed Bugs (fixed)
temp_directory_path failure on Windows with path length > 130 char
Reported by: | Owned by: | Beman Dawes | |
---|---|---|---|
Milestone: | Boost 1.58.0 | Component: | filesystem |
Version: | Boost Development Trunk | Severity: | Problem |
Keywords: | Cc: |
Description
The GetTempPath API (which temp_directory_path uses internally) will not behave as expected if the path to the temp dir is longer than 130 characters.
A workaround is to first try to use GetEnvironmentVariable on "TMP" and "TEMP", then fall back on GetTempPath.
No patch provided because unfortunately I don't have access to my tools at the moment, but it should be a relatively trivial fix.
Thanks in advance.
Change History (2)
comment:1 by , 12 years ago
comment:2 by , 8 years ago
Milestone: | To Be Determined → Boost 1.58.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Rewrite Windows implementation of temp_directory_path() to (1) avoid GetTempPath() to fix ticket and (2) provide a more sensible sequence of directories than provided by GetTempPath(), per boost list discussion "[filesystem] temp_directory_path() behavior on Windows".
Sorry to take so long to get to this.
Thanks,
--Beman
More information on the problem available here: https://blogs.msdn.com/b/larryosterman/archive/2010/10/19/because-if-you-do_2c00_-stuff-doesn_2700_t-work-the-way-you-intended_2e00_.aspx