Browse code

fix typo in summary

René Wagner authored on 03.01.2020 10:16:58
Showing 2 changed files

... ...
@@ -71,7 +71,7 @@ sub delete_files
71 71
 		}
72 72
 	}
73 73
 	
74
-	say "\r\nfound $file_counter duplicate file versions.";
74
+	say "\r\n$file_counter duplicate file versions found.";
75 75
 }
76 76
 
77 77
 sub exist_newer_file
... ...
@@ -84,7 +84,13 @@ sub exist_newer_file
84 84
 		# the version must be atleast 1 above the current version
85 85
 		my $filename = basename($original_file);
86 86
 		my @fileparts = split /\./, $filename;
87
-		
87
+	
88
+		# don't handle files that doesn't have a version
89
+		if ( scalar @fileparts < 4 )
90
+		{
91
+			return 0;
92
+		}
93
+
88 94
 		my $version_regex;
89 95
 		# HACK: file versions greater 8 will not be checked as the regex can't handle that atm
90 96
 		if ( $fileparts[2] > 8 )
... ...
@@ -71,7 +71,7 @@ sub delete_files
71 71
 		}
72 72
 	}
73 73
 	
74
-	say "\r\nfound $file_counter orphaned sidecar files found.";
74
+	say "\r\n$file_counter orphaned sidecar files found.";
75 75
 }
76 76
 
77 77
 sub exists_raw_filename