Skip to content

Commit

Permalink
fuse: set file modification time also for failed jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
joergsteffens committed Jan 20, 2017
1 parent 454d20b commit e19f64f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion bareos/fuse/node/job.py
Expand Up @@ -24,10 +24,18 @@ def __init__(self, root, job):
self.stat.st_ctime = self._convert_date_bareos_unix(self.job['starttime'])
except KeyError:
pass

try:
self.stat.st_mtime = self._convert_date_bareos_unix(self.job['realendtime'])
endtime = self.job['realendtime']
except KeyError:
pass
if not endtime:
try:
endtime = self.job['endtime']
except KeyError:
pass
self.stat.st_mtime = self._convert_date_bareos_unix(endtime)

if job['jobstatus'] == 'T' or job['jobstatus'] == 'E' or job['jobstatus'] == 'W' or job['jobstatus'] == 'f':
self.set_static()

Expand Down

0 comments on commit e19f64f

Please sign in to comment.