Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
os: refine tmpdir() trailing slash stripping
os.tmpdir() began stripping trailing slashes in b57cc51. This causes problems if the temp directory is simply '/'. It also stripped trailing slashes without first determining which slash type is used by the current operating system. This commit only strips trailing slashes if another character precedes the slash. On Windows, it checks for ':', as not to strip slashes from something like 'C:\'. It also only strips slashes that are appropriate for the user's operating system. Fixes: #1669 PR-URL: #1673 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Christian Tellnes <christian@tellnes.no>
- Loading branch information