folg / slimrat

Automatically exported from code.google.com/p/slimrat
MIT License
0 stars 0 forks source link

To prefix dump file names with zeros? #158

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It would be nice to have dump file name prefixed with leading zeros.
Now it makes dump file names such

1.html
2.html
3.png
...
11.html
12.html

so when i alfabeticaly sort the files, it doesnot keeps natural file order.

When you do small, small change in Log.pm in dump_write() procedure:

#my $filename = $counter . "." . $dump->{type};
my $filename =  sprintf("%04d.%s", $counter, $dump->{type});

then files will be named as:
0001.html
0002.html
0003.png
...
0011.html
0012.html

;o)

Thanks

Tom

Original issue reported on code.google.com by tomas.bk...@gmail.com on 11 Jun 2010 at 6:38

Attachments:

GoogleCodeExporter commented 9 years ago
cool ;)
r423

Original comment by premysl....@gmail.com on 11 Jun 2010 at 1:24