From 02321769f658fbe95c046c17f0c5b4de759d282f Mon Sep 17 00:00:00 2001 From: pcanterino <> Date: Sun, 1 Aug 2004 11:39:56 +0000 Subject: [PATCH] Allow to change the group of a file using the Group ID (Let's hope nobody will define a group composed only of numbers - let's hope it isn't allowed at all - I should install Linux at home...) --- modules/File/Access.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/File/Access.pm b/modules/File/Access.pm index 31ad87d..bc1e37d 100644 --- a/modules/File/Access.pm +++ b/modules/File/Access.pm @@ -7,7 +7,7 @@ package File::Access; # with only one command # # Author: Patrick Canterino -# Last modified: 2004-07-28 +# Last modified: 2004-08-01 # use strict; @@ -40,7 +40,7 @@ use base qw(Exporter); sub chgrp($@) { my ($group,@files) = @_; - my $gid = getgrnam($group); + my $gid = ($group !~ /^\d+$/) ? getgrnam($group): $group; return unless($gid); return chown(-1,$gid,@files); -- 2.34.1