mirror of
https://github.com/curl/curl.git
synced 2026-04-15 01:05:56 +08:00
Move existing `Curl_rename()` `rename()` wrapper from lib to curlx/fopen, and make it a curlx macro/function. To allow using the local worker function to fixup long filenames on Windows. Then fix the Windows-specific rename implementation to support long filenames. This operation may happen when using a cookie jar, HSTS cache or alt-svc cache, via libcurl or the curl tool. Before this patch, when passing a long filename to the above options, a `<random>.tmp` file was left on the disk without renaming it to the filename passed to curl. There was also 1 second delay for each attempted rename operation. Also: - checksrc: ban raw `rename()` and `MoveFileEx*()` functions. - Note: `Curl_rename()` returned 1 on failure before this patch, while `curlx_rename()` returns -1 after, to match POSIX `rename()`. Refs: https://learn.microsoft.com/windows/win32/api/winbase/nf-winbase-movefileexa https://learn.microsoft.com/windows/win32/fileio/maximum-file-path-limitation Ref: #20040 Closes #20042 |
||
|---|---|---|
| .. | ||
| .checksrc | ||
| cd2cd | ||
| cd2nroff | ||
| cdall | ||
| checksrc-all.pl | ||
| checksrc.pl | ||
| ciconfig.pl | ||
| cijobs.pl | ||
| cmakelint.sh | ||
| CMakeLists.txt | ||
| completion.pl | ||
| contributors.sh | ||
| contrithanks.sh | ||
| coverage.sh | ||
| delta | ||
| dmaketgz | ||
| extract-unit-protos | ||
| firefox-db2pem.sh | ||
| installcheck.sh | ||
| Makefile.am | ||
| maketgz | ||
| managen | ||
| mdlinkcheck | ||
| mk-ca-bundle.pl | ||
| mk-unity.pl | ||
| nroff2cd | ||
| perlcheck.sh | ||
| pythonlint.sh | ||
| randdisable | ||
| release-notes.pl | ||
| release-tools.sh | ||
| schemetable.c | ||
| singleuse.pl | ||
| top-complexity | ||
| verify-release | ||
| wcurl | ||