/
githubmirror
/
libarchive
Обзор
Документация
Войти
/
githubmirror
/
libarchive
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
tar/bsdtar.rc
20 строк
802 B
Reyad Attiyat
tar: mark bsdtar as long-path aware on Windows
23 июн 2026, 06:37
23 июн 2026, 06:37
6ef83d7
Код
Авторство
О чём код?
/* * SPDX-License-Identifier: BSD-2-Clause * * Embed an application manifest that marks bsdtar as long-path aware. * * bsdtar implements -C/--directory on Windows with SetCurrentDirectoryW(), * whose argument is limited to MAX_PATH (260) characters unless the process * opts in to long paths via a "longPathAware" manifest. A system-wide * LongPathsEnabled registry value is not sufficient on its own; the executable * must also carry this manifest. Without it, extracting into deeply nested * destination directories fails with "could not chdir to ...". * * See: * https://learn.microsoft.com/windows/win32/fileio/maximum-file-path-limitation */ #define RT_MANIFEST 24 #define CREATEPROCESS_MANIFEST_RESOURCE_ID 1 CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "bsdtar.exe.manifest"