Browse Source

Create output dir if missing

master
Gwendal 6 years ago
parent
commit
9c44e491ef
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/main/kotlin/bandcampcollectiondownloader/BandcampCollectionDownloader.kt

+ 2
- 2
src/main/kotlin/bandcampcollectiondownloader/BandcampCollectionDownloader.kt View File

@ -102,12 +102,12 @@ class BandCampDownloaderError(s: String) : Exception(s)
fun downloadAlbum(artistFolderPath: Path?, albumFolderPath: Path, albumtitle: String, url: String, cookies: Map<String, String>, 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


Loading…
Cancel
Save