- cur_date = now_date.strftime("%Y-%m-%d")
- dest = os.path.join(cnf["Dir::Morgue"], cnf["Clean-Suites::MorgueSubDir"], cur_date)
- if not os.path.exists(dest):
- os.mkdir(dest)
+ morguedir = cnf.get("Dir::Morgue", os.path.join("Dir::Pool", 'morgue'))
+ morguesubdir = cnf.get("Clean-Suites::MorgueSubDir", 'pool')
+
+ # Build directory as morguedir/morguesubdir/year/month/day
+ dest = os.path.join(morguedir,
+ morguesubdir,
+ str(now_date.year),
+ '%.2d' % now_date.month,
+ '%.2d' % now_date.day)
+
+ if not Options["No-Action"] and not os.path.exists(dest):
+ os.makedirs(dest)