Skip to content

Commit 7f67b39

Browse files
committed
temporary mapfiles with even more random filenames
Add microseconds to filename.
1 parent 426f037 commit 7f67b39

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

BBBikeMapserver.pm

+5-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Author: Slaven Rezic
66
#
7-
# Copyright (C) 2002,2003,2005,2013,2015 Slaven Rezic. All rights reserved.
7+
# Copyright (C) 2002,2003,2005,2013,2015,2023 Slaven Rezic. All rights reserved.
88
# This program is free software; you can redistribute it and/or
99
# modify it under the same terms as Perl itself.
1010
#
@@ -18,6 +18,8 @@ package BBBikeMapserver;
1818
use strict;
1919
use File::Basename;
2020
use CGI;
21+
use Time::HiRes ();
22+
2123
use BBBikeCGI::Util ();
2224
use BBBikeMapserver::Bbox;
2325

@@ -318,7 +320,8 @@ sub create_mapfile {
318320

319321
if ($do_route) {
320322
# create a new unique id
321-
my $prefix = "xxx-" . time . "-" . $$ . int(rand(100000));
323+
my $dashed_time = Time::HiRes::time(); $dashed_time =~ s{\.}{-};
324+
my $prefix = "xxx-" . $dashed_time . "-" . $$ . int(rand(100000));
322325

323326
my @scopes;
324327
my $preferred_scope;

0 commit comments

Comments
 (0)