Skip to content

Commit

Permalink
Disable for now broken tga and gif files (#270)
Browse files Browse the repository at this point in the history
  • Loading branch information
qarmin authored Feb 22, 2021
1 parent e3457ed commit 87f5ca6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion czkawka_core/src/broken_files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ fn load_cache_from_file(text_messages: &mut Messages) -> Option<HashMap<String,

fn check_extension_avaibility(file_name_lowercase: &str) -> TypeOfFile {
// Checking allowed image extensions
let allowed_image_extensions = [".jpg", ".jpeg", ".png", ".bmp", ".tiff", ".tif", ".pnm", ".tga", ".ff", ".gif", ".jif", ".jfi", ".ico", ".webp", ".avif"];
let allowed_image_extensions = [".jpg", ".jpeg", ".png", ".bmp", ".tiff", ".tif", ".pnm", ".ff", ".jif", ".jfi", ".ico", ".webp", ".avif"]; // TODO Re-enable broken files checking after image-rs update // tga, gif
let allowed_archive_zip_extensions = [".zip"]; // Probably also should work [".xz", ".bz2"], but from my tests they not working
let allowed_audio_extensions = [".mp3", ".flac", ".wav", ".ogg"]; // Probably also should work [".xz", ".bz2"], but from my tests they not working
if allowed_image_extensions.iter().any(|e| file_name_lowercase.ends_with(e)) {
Expand Down
2 changes: 1 addition & 1 deletion czkawka_core/src/similar_images.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ impl SimilarImages {
.to_lowercase();

// Checking allowed image extensions
let allowed_image_extensions = [".jpg", ".jpeg", ".png", ".bmp", ".tiff", ".tif", ".pnm", ".tga", ".ff", ".gif", ".jif", ".jfi"];
let allowed_image_extensions = [".jpg", ".jpeg", ".png", ".bmp", ".tiff", ".tif", ".pnm", ".ff", ".jif", ".jfi"];
if !allowed_image_extensions.iter().any(|e| file_name_lowercase.ends_with(e)) {
continue 'dir;
}
Expand Down

0 comments on commit 87f5ca6

Please sign in to comment.