Skip to content

Commit

Permalink
exif fix for non utf8 filesnames, bulk processing
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgendl committed Dec 22, 2023
1 parent 1b54ba8 commit 5b19f48
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down Expand Up @@ -499,10 +500,11 @@ public List<ExifInfo> exifInfoMulti(FilePath sameDriveTmp, List<FilePath> p, Lis
));
Map<String, FilePath> nameMapping = new HashMap<>();
List<Path> 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) {
Expand Down

0 comments on commit 5b19f48

Please sign in to comment.