Skip to content

Commit

Permalink
Strip trailing slashes from the incoming source path.
Browse files Browse the repository at this point in the history
  • Loading branch information
sdboyer committed Feb 17, 2011
1 parent 4fcab71 commit 9a61024
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion shared.php
Expand Up @@ -178,8 +178,10 @@ function git_log($message, $level = 'NORMAL', $project = NULL) {
*/
function import_directory($config, $root, $source, $destination, $wipe = FALSE) {
global $rename_patterns, $wd;
// Ensure no trailing slashes for cleanliness
$source = rtrim($source, '/');
$absolute_source_dir = $root . '/' . $source;
$elements = explode('/', rtrim($source, '/'));
$elements = explode('/', $source);
$project = array_pop($elements);

// If the source is an empty directory, skip it; cvs2git barfs on these.
Expand Down

0 comments on commit 9a61024

Please sign in to comment.