Exception with certain characters in paths under Windows
Opened this issue · 0 comments
pascalpuffke commented
Certain characters in paths can lead to IOExceptions. Does not occur on macOS, Linux, or other good operating systems.
C:\Users\uwu\.jdks\openjdk-15.0.1\bin\java.exe "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.3\lib\idea_rt.jar=55420:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.3\bin" -Dfile.encoding=UTF-8 -classpath C:\Users\uwu\Exercism\java\stats\out\production\stats;C:\Users\uwu\Documents\jaudiotagger-2.2.6-SNAPSHOT.jar de.mineclashtv.Main
----------------------------------------
Musicstat v1.1.0
----------------------------------------
Please enter the root directory of your music library (e.g. ~/Music)
=> D:\Musik\
Successfully set path to D:\Musik
Please enter the metadata you want to get
title, artist, album, year, track, bitrate, sample rate, bits per sample, format
=> format
Sorting by format
Exception in thread "main" java.io.UncheckedIOException: java.nio.file.NoSuchFileException: D:\Musik\Tidal Rips\King Gizzard & The Lizard Wizard\K.G.
at java.base/java.nio.file.FileTreeIterator.fetchNextIfNeeded(FileTreeIterator.java:87)
at java.base/java.nio.file.FileTreeIterator.hasNext(FileTreeIterator.java:103)
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:132)
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
at de.mineclashtv.utils.FileUtilities.getMusicFiles(FileUtilities.java:27)
at de.mineclashtv.cli.Interface.output(Interface.java:87)
at de.mineclashtv.cli.Interface.start(Interface.java:81)
at de.mineclashtv.Main.main(Main.java:17)
Caused by: java.nio.file.NoSuchFileException: D:\Musik\Tidal Rips\King Gizzard & The Lizard Wizard\K.G.
at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
at java.base/sun.nio.fs.WindowsDirectoryStream.<init>(WindowsDirectoryStream.java:86)
at java.base/sun.nio.fs.WindowsFileSystemProvider.newDirectoryStream(WindowsFileSystemProvider.java:520)
at java.base/java.nio.file.Files.newDirectoryStream(Files.java:476)
at java.base/java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:300)
at java.base/java.nio.file.FileTreeWalker.next(FileTreeWalker.java:373)
at java.base/java.nio.file.FileTreeIterator.fetchNextIfNeeded(FileTreeIterator.java:83)
... 12 more
Process finished with exit code 1