From: Jess Robinson Date: Fri, 1 Feb 2008 23:01:26 +0000 (+0000) Subject: Sanitise filename of sqlite backup file X-Git-Tag: v0.08240~545^2~15 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a32c360cb9ef6e0f182a4e440d95ff7f88b58919;p=dbsrgits%2FDBIx-Class.git Sanitise filename of sqlite backup file --- diff --git a/lib/DBIx/Class/Storage/DBI/SQLite.pm b/lib/DBIx/Class/Storage/DBI/SQLite.pm index 87c5289..dbe5ea0 100644 --- a/lib/DBIx/Class/Storage/DBI/SQLite.pm +++ b/lib/DBIx/Class/Storage/DBI/SQLite.pm @@ -33,7 +33,7 @@ sub backup # my $dbfile = file($dbname); my ($vol, $dbdir, $file) = File::Spec->splitpath($dbname); # my $file = $dbfile->basename(); - $file = strftime("%y%m%d%h%M%s", localtime()) . $file; + $file = strftime("%Y-%m-%d-%H_%M_%S", localtime()) . $file; $file = "B$file" while(-f $file); mkdir($dir) unless -f $dir;