[Rt-commit] rt branch, 4.2/importer-abs-paths, created. rt-4.2.2-2-g1ed3088
Alex Vandiver
alexmv at bestpractical.com
Wed Jan 15 13:31:26 EST 2014
The branch, 4.2/importer-abs-paths has been created
at 1ed3088254e9275437f2beb3a2de62b0c2c139c9 (commit)
- Log -----------------------------------------------------------------
commit 1ed3088254e9275437f2beb3a2de62b0c2c139c9
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.
Closes [issues #28434].
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