Add selection file to bypass Windows command length limits (correction) (865df7a5) · Commits · Inkscape / inkscape · GitLab
Martin Owens
·
2026-05-15
·
via Martin Owens activity
| Original line number |
Diff line number |
Diff line |
|
@@ -612,12 +612,12 @@ void Script::effect(Inkscape::Extension::Effect *mod, ExecutionEnv *executionEnv |
|
|
static size_t get_cmdline_budget()
|
|
|
{
|
|
|
#ifdef _WIN32
|
|
|
// Windows: Length limit is fixed at 32737
|
|
|
// Leave 4096 of overhead for executable and files
|
|
|
return 28701; // 32737-4096
|
|
|
// Windows: Length limit is fixed at 32767
|
|
|
// Leave 4096 of overhead for executable and files (rough overestimate)
|
|
|
return 32767 - 4096;
|
|
|
#else
|
|
|
// Unix: Length limit is from sysconf
|
|
|
// Leave 32K of overhead for executable, files, and environment
|
|
|
// Leave 32K of overhead for executable, files, and environment (rough overestimate)
|
|
|
// Also guard against sysconf failure (-1)
|
|
|
long const arg_max = sysconf(_SC_ARG_MAX);
|
|
|
size_t usable = 0;
|
|
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。