Skip to content

Commit

Permalink
Fix a regexp bug with PHP5.1.5 and simplify directory separator clean…
Browse files Browse the repository at this point in the history
…ing regexp in file_path function
  • Loading branch information
Fabrice Luraine committed Nov 27, 2010
1 parent ae987d4 commit 446a50d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/limonade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2448,9 +2448,8 @@ function file_path($path)
$win_ds = '\\';
$n_path = count($args) > 1 ? implode($ds, $args) : $path;
if(strpos($n_path, $win_ds) !== false) $n_path = str_replace( $win_ds, $ds, $n_path );
$n_path = preg_replace( '/'.preg_quote($ds, $ds).'{2,}'.'/',
$ds,
$n_path);
$n_path = preg_replace( "#$ds+#", $ds, $n_path);

return $n_path;
}

Expand Down

0 comments on commit 446a50d

Please sign in to comment.