Page MenuHomePhabricator

D19691.diff
No OneTemporary

D19691.diff

diff --git a/src/filesystem/Filesystem.php b/src/filesystem/Filesystem.php
--- a/src/filesystem/Filesystem.php
+++ b/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
Sun, Mar 9, 3:39 AM (2 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7309524
Default Alt Text
D19691.diff (703 B)

Event Timeline