Create folders only if there are screenshots for the game
This commit is contained in:
parent
5d814b8539
commit
3ec1042ef5
|
@ -72,6 +72,11 @@ func processGames(games []games.Game, outputPath string, dryRun bool, downloadCo
|
||||||
destinationPath = filepath.Join(destinationPath, game.ID)
|
destinationPath = filepath.Join(destinationPath, game.ID)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Do not continue if there's no screenshots
|
||||||
|
if len(game.Screenshots) == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
// Check if folder exists
|
// Check if folder exists
|
||||||
if _, err := os.Stat(destinationPath); os.IsNotExist(err) && !dryRun {
|
if _, err := os.Stat(destinationPath); os.IsNotExist(err) && !dryRun {
|
||||||
mkdirErr := os.MkdirAll(destinationPath, 0711)
|
mkdirErr := os.MkdirAll(destinationPath, 0711)
|
||||||
|
|
Loading…
Reference in New Issue