[Rt-commit] rt branch, 4.2/importer-abs-paths, created. rt-4.2.2-2-g5ea81fe
Alex Vandiver
alexmv at bestpractical.com
Wed Jan 15 13:30:35 EST 2014
The branch, 4.2/importer-abs-paths has been created
at 5ea81fe0269e59463eca86f75b9073e53a5826f2 (commit)
- Log -----------------------------------------------------------------
commit 5ea81fe0269e59463eca86f75b9073e53a5826f2
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Jan 15 13:30:12 2014 -0500
Importer: If the serializer wrote absoolute paths, be sure to trim them
3d9985d8 trimmed the stored path from the list of files, but only the
first level, and only functioned if the directory was relative, not
absolute. Trim and replace the entire path, which makes archives
created with `rt-serialize --directory /tmp/rt` load correctly.
diff --git a/lib/RT/Migrate/Importer/File.pm b/lib/RT/Migrate/Importer/File.pm
index 02e9f44..d777561 100644
--- a/lib/RT/Migrate/Importer/File.pm
+++ b/lib/RT/Migrate/Importer/File.pm
@@ -85,7 +85,7 @@ sub Import {
my $dir = $self->{Directory};
if ($self->{Metadata} and $self->{Metadata}{Files}) {
- $self->{Files} = [ map {s|^.*?/|$dir/|;$_} @{$self->{Metadata}{Files}} ];
+ $self->{Files} = [ map {s|^.*/|$dir/|;$_} @{$self->{Metadata}{Files}} ];
} else {
$self->{Files} = [ <$dir/*.dat> ];
}
-----------------------------------------------------------------------
More information about the rt-commit
mailing list