From: Mike Francis Date: Wed, 24 Dec 2014 12:03:18 +0000 (+0000) Subject: Fix fixture filenames to be compatible with ntfs systems X-Git-Tag: v1.001027_01~1^2~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7a8790e251730dd10c1da4731c227a5b65da1ec6;p=dbsrgits%2FDBIx-Class-Fixtures.git Fix fixture filenames to be compatible with ntfs systems --- diff --git a/lib/DBIx/Class/Fixtures.pm b/lib/DBIx/Class/Fixtures.pm index 58cf981..0c1abde 100644 --- a/lib/DBIx/Class/Fixtures.pm +++ b/lib/DBIx/Class/Fixtures.pm @@ -847,9 +847,9 @@ sub dump_object { my $source_dir = $params->{set_dir}->subdir($self->_name_for_source($src)); $source_dir->mkpath(0, 0777); - # strip dir separators from file name - my $file = $source_dir->file( - join('-', map { s|[/\\]|_|g; $_; } @pk_vals) . '.fix' + # Convert characters not allowed on windows + my $file = io->catfile("$source_dir", + join('-', map { s|[/\\:\*\|\?"<>]|_|g; $_; } @pk_vals) . '.fix' ); # write file