Просмотр исходного кода

Added a trailing slash to $imagepath if it wasnt there

cheetham14 25 лет назад
Родитель
Сommit
0cb8b2c3e5
1 измененных файлов с 5 добавлено и 0 удалено
  1. 5 0
      pisg.pl

+ 5 - 0
pisg.pl

@@ -152,6 +152,11 @@ sub init_pisg
     $repeated = 0;
     $lastnormal = "";
 
+    # Add trailing slash when it's not there..
+    if (substr($imagepath, -1) ne '/') {
+        $imagepath =~ s/(.*)/$1\//;
+    }
+
     print "Statistics for channel $channel \@ $network by $maintainer\n\n";
     print "Using language template: $lang\n\n" if ($lang ne 'EN');