--- wiki.pm-20021218	Mon Dec  9 01:34:52 2002
+++ wiki.pm	Mon Jan 27 20:25:48 2003
@@ -221,7 +221,12 @@
 
 sub readVersion {
     my( $name, $rev) = @_;
-    return `/usr/local/bin/co -q -p$rev $textDir/$name.txt`;
+    #To additionally test  -f $textDir/RCS/$topic.txt,v we need to break up the arguments for this function.
+    if ( -f $name,v ) {
+	return `/usr/bin/co -q -p$rev $textDir/$name.txt`;
+    } else {
+    	return "1.0";
+    }
 }
 
 
@@ -287,9 +292,9 @@
 
 sub getRevisionNumber {
 
-    if ($useRCS) {
+    if ($useRCS) && ( -f $textDir/$topic.txt,v || -f $textDir/RCS/$topic.txt,v ) {
         my( $topic) = @_;
-        my $tmp= `/usr/local/bin/rlog -h $textDir/$topic.txt`;
+        my $tmp= `/usr/bin/rlog -h $textDir/$topic.txt`;
         $tmp =~ /head: (.*?)\n/;
         return $1;
     } else {
@@ -345,9 +350,9 @@
     $oldText = removeSystemTags($oldText);
 
     if ($oldText ne $text) {
-        if ($saveToRCS and $oldText and ($oldAuthor ne $userName)) {
+        if ($saveToRCS and $oldText and ($oldAuthor ne $userName) && ( -f $name,v || -f $textDir/RCS/$topic.txt,v )) {
             # Backup old content to RCS if the user has changed.
-            `/usr/local/bin/ci -l -q -mnone -t-none -w'$userName' $name`
+            `/usr/bin/ci -l -q -mnone -t-none -w'$userName' $name`
             #(why was that back-quoted?)
         }