From: Bernd Bleßmann Date: Fri, 3 Dec 2021 16:14:28 +0000 (+0100) Subject: DMS: Webdav-Backend: Root-Pfad nicht erraten, sondern holen X-Git-Tag: kivitendo-mebil_0.1-0~10^2~2^2~258 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=011e7aebbcb510731ce950099379add0e7b6c1fb;p=kivitendo-erp.git DMS: Webdav-Backend: Root-Pfad nicht erraten, sondern holen --- diff --git a/SL/File/Backend/Webdav.pm b/SL/File/Backend/Webdav.pm index b1e48edf9..3e74b1e84 100644 --- a/SL/File/Backend/Webdav.pm +++ b/SL/File/Backend/Webdav.pm @@ -5,7 +5,8 @@ use strict; use parent qw(SL::File::Backend); use SL::DB::File; -#use SL::Webdav; +use SL::System::Process; +use SL::Webdav; use File::Copy; use File::Slurp; use File::Basename; @@ -205,17 +206,7 @@ sub webdav_path { return (File::Spec->catfile($path, $fname), $path, $fname); } -sub get_rootdir { - my ($self) = @_; - - #TODO immer noch das alte Problem: - #je nachdem von woher der Aufruf kommt ist man in ./users oder . - my $rootdir = POSIX::getcwd(); - my $basename = basename($rootdir); - my $dirname = dirname($rootdir); - $rootdir = $dirname if $basename eq 'users'; - return $rootdir; -} +sub get_rootdir { SL::System::Process::exe_dir() } sub _get_number_from_model { my ($self, $dbfile) = @_; @@ -345,5 +336,3 @@ The synchronization must be tested and a periodical task is needed to synchroniz Martin Helmling Emartin.helmling@opendynamic.deE =cut - -