From 5b19f489d6414a02dfc2bd47955adbacbcb6ccad Mon Sep 17 00:00:00 2001 From: jurgendl Date: Fri, 22 Dec 2023 19:33:55 +0100 Subject: [PATCH] exif fix for non utf8 filesnames, bulk processing --- .../main/java/org/jhaws/common/io/media/exif/ExifTool.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jhaws/media/src/main/java/org/jhaws/common/io/media/exif/ExifTool.java b/jhaws/media/src/main/java/org/jhaws/common/io/media/exif/ExifTool.java index 32b89e34..4273a824 100644 --- a/jhaws/media/src/main/java/org/jhaws/common/io/media/exif/ExifTool.java +++ b/jhaws/media/src/main/java/org/jhaws/common/io/media/exif/ExifTool.java @@ -44,6 +44,7 @@ import org.jhaws.common.io.console.Processes.Lines; import org.jhaws.common.io.media.MediaCte; import org.jhaws.common.io.media.Tool; +import org.jhaws.common.lang.IntegerValue; /** * @see http://www.sno.phy.queensu.ca/~phil/exiftool/ @@ -499,10 +500,11 @@ public List exifInfoMulti(FilePath sameDriveTmp, List p, Lis )); Map nameMapping = new HashMap<>(); List links = new ArrayList<>(); + IntegerValue ii = new IntegerValue(); p.stream().forEach(a -> { String absolutePath = a.getAbsolutePath(); if (containsNonUTF8Characters(absolutePath)) { - FilePath tmp = sameDriveTmp.child("" + System.currentTimeMillis()); + FilePath tmp = sameDriveTmp.child(ii.add() + "-" + System.currentTimeMillis()); try { links.add(Files.createLink(tmp.toPath(), a.toPath())); } catch (IOException ex) {