Toasty27/codecraft-init-script — comment on commit 3899adb474a7139142cdd9f720d618c71f079453
File:  line 0
By Toasty27:

Scratch that. The check has to be made before the child directory is made to prevent a failure in the creation of the child directory and potentially causing an older backup to be over-written.

But checking the date after creation of the parent directory and before the creation of the child directory is overly redundant, so the check has to come after the creation of the child directory.

Maybe the child directory should be made in a separate temporary directory, and the date checked then before moving the folder to it's proper destination? Though that seems a tad in-elegant.

'Course, this code in general is pretty in-elegant as it is.