diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-07-08 14:33:25 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-07-08 14:33:25 +1200 |
commit | 731020440991a53034dd2e980add2a08cb9a19de (patch) | |
tree | 2fdc5564eea69f3b3bdffb17439519daf505b348 /src/org/traccar/database | |
parent | dc5dc6b6ff9b33db50d7a706017b4a0e8f423398 (diff) | |
download | trackermap-server-731020440991a53034dd2e980add2a08cb9a19de.tar.gz trackermap-server-731020440991a53034dd2e980add2a08cb9a19de.tar.bz2 trackermap-server-731020440991a53034dd2e980add2a08cb9a19de.zip |
Fix code check issues
Diffstat (limited to 'src/org/traccar/database')
-rw-r--r-- | src/org/traccar/database/MediaManager.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/database/MediaManager.java b/src/org/traccar/database/MediaManager.java index 4b5930642..2c448a20c 100644 --- a/src/org/traccar/database/MediaManager.java +++ b/src/org/traccar/database/MediaManager.java @@ -40,7 +40,10 @@ public class MediaManager { private File createFile(String uniqueId, String name) throws IOException { Path filePath = Paths.get(path, uniqueId, name); - Files.createDirectories(filePath.getParent()); + Path directoryPath = filePath.getParent(); + if (directoryPath != null) { + Files.createDirectories(directoryPath); + } return filePath.toFile(); } |