[Pkg-mono-svn-commits] rev 610 - xsp-snapshot/trunk/debian/official

Pablo Fischer pabl0-guest@haydn.debian.org
Sun, 18 Apr 2004 11:48:55 -0600


Author: pabl0-guest
Date: 2004-04-18 11:48:52 -0600 (Sun, 18 Apr 2004)
New Revision: 610

Modified:
   xsp-snapshot/trunk/debian/official/mono-server-reader.conf
   xsp-snapshot/trunk/debian/official/mono-xsp-reader.conf
Log:
Fixed a bug when users try to declare their paths with spaces before or after
the '=' char.



Modified: xsp-snapshot/trunk/debian/official/mono-server-reader.conf
===================================================================
--- xsp-snapshot/trunk/debian/official/mono-server-reader.conf	2004-04-18 15:44:05 UTC (rev 609)
+++ xsp-snapshot/trunk/debian/official/mono-server-reader.conf	2004-04-18 17:48:52 UTC (rev 610)
@@ -74,7 +74,9 @@
 	}
 	else {
 	    #Ok, the directory exists?
-	    my $dir = (split /\= /, $line)[1];
+	    my $dir = (split /\=/, $line)[1];
+	    #Remove blank spaces
+	    $dir =~ tr/\ //d;
 	    #remove that \n
 	    $dir =~ s/\n//;
  	    if ( ! -d "$dir" ) {
@@ -93,7 +95,10 @@
 	    last;
 	}
 	else {
-	    $alias = (split /\= /, $line)[1];
+	    $alias = (split /\=/, $line)[1];
+	    #Blank Spaces
+	    $alias =~ tr/\ //d;
+	    #New lines..
 	    $alias =~ s/\n//;
 	}
     }	

Modified: xsp-snapshot/trunk/debian/official/mono-xsp-reader.conf
===================================================================
--- xsp-snapshot/trunk/debian/official/mono-xsp-reader.conf	2004-04-18 15:44:05 UTC (rev 609)
+++ xsp-snapshot/trunk/debian/official/mono-xsp-reader.conf	2004-04-18 17:48:52 UTC (rev 610)
@@ -73,7 +73,9 @@
 	}
 	else {
 	    #Ok, the directory exists?
-	    my $dir = (split /\= /, $line)[1];
+	    my $dir = (split /\=/, $line)[1];
+	    #Remove blank spaces
+	    $dir =~ tr/\ //d;
 	    #remove that \n
 	    $dir =~ s/\n//;
  	    if ( ! -d "$dir" ) {
@@ -91,9 +93,13 @@
 	    print "Sorry\, but you have an alias in a unopened section (line $counter)\n";
 	    last;
 	}
-	else {
-	    $alias = (split /\= /, $line)[1];
+	else {	    
+	    $alias = (split /\=/, $line)[1];
+	    #Blank Spaces
+	    $alias =~ tr/\ //d;
+	    #New lines..
 	    $alias =~ s/\n//;
+	    
 	}
     }	
 }