From: Sven Schöling Date: Fri, 25 Feb 2011 12:18:31 +0000 (+0100) Subject: File::Path auf legacy Interface umgestellt, damit es auf Maschinen vor 2010 läuft. X-Git-Tag: release-2.7.0beta1~396^2~61 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=30e09cb2e85d2eab0d3cd9653eafdfef51df8645;p=kivitendo-erp.git File::Path auf legacy Interface umgestellt, damit es auf Maschinen vor 2010 läuft. --- diff --git a/SL/SessionFile.pm b/SL/SessionFile.pm index 12f498465..b9a5b7697 100644 --- a/SL/SessionFile.pm +++ b/SL/SessionFile.pm @@ -5,7 +5,7 @@ use strict; use parent qw(Rose::Object); use Carp; -use File::Path qw(make_path remove_tree); +use File::Path qw(mkpath rmtree); use English qw(-no_match_vars); use IO::File; use POSIX qw(strftime); @@ -56,7 +56,7 @@ sub get_path { sub prepare_path { my $path = get_path(); return $path if -d $path; - make_path $path; + mkpath $path; die "Creating ${path} failed" unless -d $path; return $path; } @@ -65,7 +65,7 @@ sub destroy_session { my ($class, $session_id) = @_; $session_id =~ s/[^a-z0-9]//gi; - remove_tree "users/session_files/$session_id" if $session_id; + rmtree "users/session_files/$session_id" if $session_id; } 1;