@xiota commented on this pull request.
@@ -2414,6 +2419,48 @@ void utils_start_new_geany_instance(const gchar *doc_path)
}
+ +static int get_path_max(const char *path) +{ +#ifdef PATH_MAX + return PATH_MAX; +#else + int path_max = pathconf(path, _PC_PATH_MAX); + if (path_max <= 0) + path_max = 4096; + return path_max; +#endif
For Windows, according to [MS](https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limi...), MAX_PATH = 260 (includes zero terminator). Longer paths (up to 32767) can be used if certain path prefixes (`\?`) are used. For Win10, long paths can also be enabled with a registry key. The app must have a manifest file and it applies to only some functions.