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: Joshua Boyce <raptorfactor@…> 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:2 by Beman Dawes, 8 years ago

Milestone: To Be DeterminedBoost 1.58.0
Resolution: fixed
Status: newclosed

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

Note: See TracTickets for help on using tickets.