diff options
Diffstat (limited to 'compat/mingw.h')
-rw-r--r-- | compat/mingw.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/compat/mingw.h b/compat/mingw.h index a03e40e6e2..2d17024129 100644 --- a/compat/mingw.h +++ b/compat/mingw.h @@ -453,6 +453,20 @@ extern char *mingw_query_user_email(void); #endif /** + * Verifies that the given path is a valid one on Windows. + * + * In particular, path segments are disallowed which + * + * - end in a period or a space (except the special directories `.` and `..`). + * + * - contain any of the reserved characters, e.g. `:`, `;`, `*`, etc + * + * Returns 1 upon success, otherwise 0. + */ +int is_valid_win32_path(const char *path); +#define is_valid_path(path) is_valid_win32_path(path) + +/** * Converts UTF-8 encoded string to UTF-16LE. * * To support repositories with legacy-encoded file names, invalid UTF-8 bytes |