silkypix-helpers

scripts for managing sidecar files created by SilkyPix Developer Studio
git clone https://git.clttr.info/silkypix-helpers.git
Log (Feed) | Files | Refs (Tags) | README | LICENSE

commit c9a61aa8723cb456cab3b925df631472bfa4ca72
parent 83e1ce87cb589fa34c39f9da7ddd9e349d56f636
Author: René Wagner <apollo@rw-net.de>
Date:   Fri,  3 Jan 2020 10:16:58 +0100

fix typo in summary

Diffstat:
Msilkypix_multiversion_sidecar_cleaner.pl | 10++++++++--
Msilkypix_orphaned_sidecar_cleaner.pl | 2+-
2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/silkypix_multiversion_sidecar_cleaner.pl b/silkypix_multiversion_sidecar_cleaner.pl @@ -71,7 +71,7 @@ sub delete_files } } - say "\r\nfound $file_counter duplicate file versions."; + say "\r\n$file_counter duplicate file versions found."; } sub exist_newer_file @@ -84,7 +84,13 @@ sub exist_newer_file # the version must be atleast 1 above the current version my $filename = basename($original_file); my @fileparts = split /\./, $filename; - + + # don't handle files that doesn't have a version + if ( scalar @fileparts < 4 ) + { + return 0; + } + my $version_regex; # HACK: file versions greater 8 will not be checked as the regex can't handle that atm if ( $fileparts[2] > 8 ) diff --git a/silkypix_orphaned_sidecar_cleaner.pl b/silkypix_orphaned_sidecar_cleaner.pl @@ -71,7 +71,7 @@ sub delete_files } } - say "\r\nfound $file_counter orphaned sidecar files found."; + say "\r\n$file_counter orphaned sidecar files found."; } sub exists_raw_filename