[LON-CAPA-cvs] cvs: loncom / lond

banghart lon-capa-cvs@mail.lon-capa.org
Tue, 24 Aug 2004 20:59:15 -0000


banghart		Tue Aug 24 16:59:15 2004 EDT

  Modified files:              
    /loncom	lond 
  Log:
  
  	Added provision for removing directory in remove_user_file_handler.
  
  
  
Index: loncom/lond
diff -u loncom/lond:1.239 loncom/lond:1.240
--- loncom/lond:1.239	Tue Aug 24 06:59:50 2004
+++ loncom/lond	Tue Aug 24 16:59:15 2004
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # lond "LON Daemon" Server (port "LOND" 5663)
 #
-# $Id: lond,v 1.239 2004/08/24 10:59:50 foxr Exp $
+# $Id: lond,v 1.240 2004/08/24 20:59:15 banghart Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -57,7 +57,7 @@
 my $status='';
 my $lastlog='';
 
-my $VERSION='$Revision: 1.239 $'; #' stupid emacs
+my $VERSION='$Revision: 1.240 $'; #' stupid emacs
 my $remoteVERSION;
 my $currenthostid="default";
 my $currentdomainid;
@@ -1908,7 +1908,11 @@
 	if (-e $udir) {
 	    my $file=$udir.'/userfiles/'.$ufile;
 	    if (-e $file) {
-		unlink($file);
+	        if (-f $file){
+		        unlink($file);
+		        }elsif(-d $file){
+		        rmdir($file);
+		}
 		if (-e $file) {
 		    &Failure($client, "failed\n", "$cmd:$tail");
 		} else {