mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Use NAMEDATALEN instead of local define.
Modify path separators for Win32. Per ideas from Takahiro Itagaki
This commit is contained in:
@ -308,9 +308,13 @@ validateDirectoryOption(migratorContext *ctx, char **dirpath,
|
||||
/*
|
||||
* Trim off any trailing path separators
|
||||
*/
|
||||
if ((*dirpath)[strlen(*dirpath) - 1] == pathSeparator)
|
||||
#ifndef WIN32
|
||||
if ((*dirpath)[strlen(*dirpath) - 1] == '/')
|
||||
#else
|
||||
if ((*dirpath)[strlen(*dirpath) - 1] == '/' ||
|
||||
(*dirpath)[strlen(*dirpath) - 1] == '\\')
|
||||
#endif
|
||||
(*dirpath)[strlen(*dirpath) - 1] = 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user