Windows:When SongKong checks a network file if local can null pointer on attributes and return true instead of false

Description

When SongKong checks a network file for isWindowsPathNeedtoLimitTo259 chars if local can null pointer in certain cirumstances and return true instead of false and this can lead to trying to shorten filenames unnecessarily

Note issue only occurs if refer directly to network path such as \\PORCUPINE\Music , if instead in Windows \\PORCUPINE\Music was mounted to a network letter (such as Z furst then it works correctly

java.lang.NullPointerException
at com.jthink.songkong.analyse.analyser.WindowsFilesystemType.isLocal(WindowsFilesystemType.java:115)
at com.jthink.songkong.analyse.analyser.FileRenamer.isWindowsPathShouldBeShortenedIfTooLong(FileRenamer.java:1124)
at com.jthink.songkong.analyse.analyser.FileRenamer.renameFilenameBasedOnMetadata(FileRenamer.java:79)
at com.jthink.songkong.analyse.analyser.FileRenamer.renameFileBasedOnMetadata(FileRenamer.java:480)
at com.jthink.songkong.analyse.analyser.FileRenamer.setNewFilename(FileRenamer.java:1324)
at com.jthink.songkong.analyse.analyser.SongSave.call(SongSave.java:118)
at com.jthink.songkong.analyse.analyser.SongSaver.saveSongsToFile(SongSaver.java:577)
at com.jthink.songkong.analyse.analyser.SongSaver.saveChanges(SongSaver.java:235)
at com.jthink.songkong.analyse.analyser.SongSaver.call(SongSaver.java:202)
at com.jthink.songkong.analyse.analyser.SongSaver.call(SongSaver.java:48)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
16/02/2021 16.19.48:GMT:WindowsFilesystemType:isLocal:SEVERE: null

Activity

Show:
IJabz
February 17, 2021, 9:36 AM

Done.

Fixed

Reporter

IJabz

Labels

None

Forum Username

aainslie

os

None

Components

Fix versions

Affects versions

Priority

Major