Skip to content

Commit 0047beb

Browse files
committed
bug fix: inc backups: email bypass
1 parent 4f98526 commit 0047beb

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

IncBackups/IncBackupsControl.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -631,12 +631,13 @@ def emailBackup(self):
631631

632632
backupPath = '/home/vmail/%s' % (self.website.domain)
633633

634-
if self.backupDestinations == 'local':
635-
self.localFunction(backupPath, 'email')
636-
elif self.backupDestinations[:4] == 'sftp':
637-
self.sftpFunction(backupPath, 'email')
638-
else:
639-
self.awsFunction('backup', backupPath, '', 'email')
634+
if os.path.exists(backupPath):
635+
if self.backupDestinations == 'local':
636+
self.localFunction(backupPath, 'email')
637+
elif self.backupDestinations[:4] == 'sftp':
638+
self.sftpFunction(backupPath, 'email')
639+
else:
640+
self.awsFunction('backup', backupPath, '', 'email')
640641

641642
logging.statusWriter(self.statusPath,
642643
'Emails for %s backed to %s.' % (self.website.domain, self.backupDestinations), 1)

0 commit comments

Comments
 (0)