Page MenuHomePhabricator

D19691.id47045.diff
No OneTemporary

D19691.id47045.diff

Index: src/filesystem/Filesystem.php
===================================================================
--- src/filesystem/Filesystem.php
+++ src/filesystem/Filesystem.php
@@ -1047,6 +1047,18 @@
return ($u == $v);
}
+ public static function concatenatePaths(array $components) {
+ $components = implode($components, DIRECTORY_SEPARATOR);
+
+ // Replace any extra sequences of directory separators with a single
+ // separator, so we don't end up with "path//to///thing.c".
+ $components = preg_replace(
+ '('.preg_quote(DIRECTORY_SEPARATOR).'{2,})',
+ DIRECTORY_SEPARATOR);
+
+ return $components;
+ }
+
/* -( Assert )------------------------------------------------------------- */

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 31, 3:38 AM (10 h, 44 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7077069
Default Alt Text
D19691.id47045.diff (728 B)

Event Timeline