[X2Go-Commits] [x2goserver] 01/01: Provide legacy support for old File::Path packages in x2godbadmin. (Fixes: #715).
git-admin at x2go.org
git-admin at x2go.org
Wed Feb 4 16:38:32 CET 2015
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository x2goserver.
commit c37724fcb7f1cb2992a44392ddf275434b7da113
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Wed Feb 4 16:38:06 2015 +0100
Provide legacy support for old File::Path packages in x2godbadmin. (Fixes: #715).
---
debian/changelog | 2 ++
x2goserver/sbin/x2godbadmin | 16 +++++++++++++---
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index eea041e..1898262 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -211,6 +211,8 @@ x2goserver (4.0.1.19-0x2go1) UNRELEASED; urgency=medium
#405).
- Handle execution of ss command from Perl script x2golistdesktops in a way
that not only works on Debian, but also on Fedora et al. (Fixes: #727).
+ - Provide legacy support for old File::Path packages in x2godbadmin.
+ (Fixes: #715).
* debian/control:
+ Add D (x2goserver): libfile-which-perl.
+ Add C (x2goserver: x2godesktopsharing (<< 3.1.1.2-0~). (Fixes: #700).
diff --git a/x2goserver/sbin/x2godbadmin b/x2goserver/sbin/x2godbadmin
index e80ffc9..6f230d0 100755
--- a/x2goserver/sbin/x2godbadmin
+++ b/x2goserver/sbin/x2godbadmin
@@ -22,7 +22,7 @@
use strict;
use Sys::Syslog qw( :standard :macros );
-use File::Path qw( make_path );
+use File::Path;
use Getopt::Long;
use DBI;
use Try::Tiny;
@@ -131,7 +131,12 @@ if ($Config->param("backend") eq 'sqlite')
{
if (! -d "$dir" )
{
- make_path("$dir");
+ if defined (File::Path::make_path)
+ File::Path::make_path("$dir");
+ elsif defined (File::Path::mkpath)
+ File::Path::mkpath("$dir");
+ else
+ die "Unable to create folders with File::Path";
}
if ( -e $dbfile)
{
@@ -480,7 +485,12 @@ sub add_user()
if (! -d "$dir/.x2go" )
{
- make_path("$dir/.x2go");
+ if defined (File::Path::make_path)
+ File::Path::make_path("$dir/.x2go");
+ elsif defined (File::Path::mkpath)
+ File::Path::mkpath("$dir/.x2go");
+ else
+ die "Unable to create folders with File::Path";
}
#save user password
--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git
More information about the x2go-commits
mailing list