From 38a0ce4844f2a3477a09f52267fedcba55c4df85 Mon Sep 17 00:00:00 2001 From: wwadmin Date: Sun, 19 Feb 2012 16:29:30 -0500 Subject: [PATCH] Fixed the tmp directory bug that affected courses with a - in the name. This updated the git version to what is in svn. --- lib/PGcore.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PGcore.pm b/lib/PGcore.pm index 8122357983..3f4f7830fa 100644 --- a/lib/PGcore.pm +++ b/lib/PGcore.pm @@ -825,7 +825,7 @@ sub surePathToTmpFile { unless ( -e $tmpDirectory) { # if by some unlucky chance the tmpDirectory hasn't been created, create it. my $parentDirectory = $tmpDirectory; $parentDirectory =~s|/$||; # remove a trailing / - $parentDirectory =~s|/\w*$||; # remove last node + $parentDirectory =~s|/[^/]*$||; # remove last node my ($perms, $groupID) = (stat $parentDirectory)[2,5]; #FIXME where is the parentDirectory defined?? #warn "Creating tmp directory at $tmpDirectory, perms $perms groupID $groupID";