mirror of
https://github.com/postgres/postgres.git
synced 2025-11-21 00:42:43 +03:00
pgindent run before PG 9.1 beta 1.
This commit is contained in:
@@ -374,21 +374,22 @@ path_is_relative_and_below_cwd(const char *path)
|
||||
else if (path_contains_parent_reference(path))
|
||||
return false;
|
||||
#ifdef WIN32
|
||||
|
||||
/*
|
||||
* On Win32, a drive letter _not_ followed by a slash, e.g. 'E:abc', is
|
||||
* relative to the cwd on that drive, or the drive's root directory
|
||||
* if that drive has no cwd. Because the path itself cannot tell us
|
||||
* which is the case, we have to assume the worst, i.e. that it is not
|
||||
* below the cwd. We could use GetFullPathName() to find the full path
|
||||
* but that could change if the current directory for the drive changes
|
||||
* underneath us, so we just disallow it.
|
||||
* On Win32, a drive letter _not_ followed by a slash, e.g. 'E:abc', is
|
||||
* relative to the cwd on that drive, or the drive's root directory if
|
||||
* that drive has no cwd. Because the path itself cannot tell us which is
|
||||
* the case, we have to assume the worst, i.e. that it is not below the
|
||||
* cwd. We could use GetFullPathName() to find the full path but that
|
||||
* could change if the current directory for the drive changes underneath
|
||||
* us, so we just disallow it.
|
||||
*/
|
||||
else if (isalpha((unsigned char) path[0]) && path[1] == ':' &&
|
||||
!IS_DIR_SEP(path[2]))
|
||||
!IS_DIR_SEP(path[2]))
|
||||
return false;
|
||||
#endif
|
||||
else
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user