Revision 30e09cb2
Von Sven Schöling vor mehr als 13 Jahren hinzugefügt
SL/SessionFile.pm | ||
---|---|---|
5 | 5 |
use parent qw(Rose::Object); |
6 | 6 |
|
7 | 7 |
use Carp; |
8 |
use File::Path qw(make_path remove_tree);
|
|
8 |
use File::Path qw(mkpath rmtree);
|
|
9 | 9 |
use English qw(-no_match_vars); |
10 | 10 |
use IO::File; |
11 | 11 |
use POSIX qw(strftime); |
... | ... | |
56 | 56 |
sub prepare_path { |
57 | 57 |
my $path = get_path(); |
58 | 58 |
return $path if -d $path; |
59 |
make_path $path;
|
|
59 |
mkpath $path;
|
|
60 | 60 |
die "Creating ${path} failed" unless -d $path; |
61 | 61 |
return $path; |
62 | 62 |
} |
... | ... | |
65 | 65 |
my ($class, $session_id) = @_; |
66 | 66 |
|
67 | 67 |
$session_id =~ s/[^a-z0-9]//gi; |
68 |
remove_tree "users/session_files/$session_id" if $session_id;
|
|
68 |
rmtree "users/session_files/$session_id" if $session_id;
|
|
69 | 69 |
} |
70 | 70 |
|
71 | 71 |
1; |
Auch abrufbar als: Unified diff
File::Path auf legacy Interface umgestellt, damit es auf Maschinen vor 2010 läuft.