From 9c44e491ef006d49aa4de574c23d7be29fe358d7 Mon Sep 17 00:00:00 2001 From: Gwendal Date: Fri, 4 Jan 2019 09:56:23 +0100 Subject: [PATCH] Create output dir if missing --- .../bandcampcollectiondownloader/BandcampCollectionDownloader.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/bandcampcollectiondownloader/BandcampCollectionDownloader.kt b/src/main/kotlin/bandcampcollectiondownloader/BandcampCollectionDownloader.kt index 3b2395d..340c431 100644 --- a/src/main/kotlin/bandcampcollectiondownloader/BandcampCollectionDownloader.kt +++ b/src/main/kotlin/bandcampcollectiondownloader/BandcampCollectionDownloader.kt @@ -102,12 +102,12 @@ class BandCampDownloaderError(s: String) : Exception(s) fun downloadAlbum(artistFolderPath: Path?, albumFolderPath: Path, albumtitle: String, url: String, cookies: Map, gson: Gson, isSingleTrack: Boolean, artid: String) { // If the artist folder does not exist, we create it if (!Files.exists(artistFolderPath)) { - Files.createDirectory(artistFolderPath) + Files.createDirectories(artistFolderPath) } // If the album folder does not exist, we create it if (!Files.exists(albumFolderPath)) { - Files.createDirectory(albumFolderPath) + Files.createDirectories(albumFolderPath) } // If the folder is empty, or if it only contains the zip.part file, we proceed