mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-02 02:40:58 +01:00
Fix failing unit test testParentEdgeCases
under Windows
Summary: Noticed that this one was failing under Windows for the test cases where the root path (`/`) was supposed to be returned. Was returned Windows-style, made it return UNIX-style. All others work fine (return slashes as-is). Test Plan: `arc unit --everything` before and after this patch on Windows. Will try out Ubuntu in near future. Reviewers: epriestley, vrana Reviewed By: vrana CC: aran, Korvin, vrana Differential Revision: https://secure.phabricator.com/D5497
This commit is contained in:
parent
86312d6986
commit
b0d408c5d3
1 changed files with 5 additions and 1 deletions
|
@ -63,7 +63,11 @@ final class DiffusionPathIDQuery {
|
||||||
*/
|
*/
|
||||||
public static function getParentPath($path) {
|
public static function getParentPath($path) {
|
||||||
$path = self::normalizePath($path);
|
$path = self::normalizePath($path);
|
||||||
return dirname($path);
|
$path = dirname($path);
|
||||||
|
if (phutil_is_windows() && $path == '\\') {
|
||||||
|
$path = '/';
|
||||||
|
}
|
||||||
|
return $path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue