diff --git a/python_apps/media-monitor/airtimefilemonitor/mediamonitorcommon.py b/python_apps/media-monitor/airtimefilemonitor/mediamonitorcommon.py index dc7e81768..7f6e4e582 100644 --- a/python_apps/media-monitor/airtimefilemonitor/mediamonitorcommon.py +++ b/python_apps/media-monitor/airtimefilemonitor/mediamonitorcommon.py @@ -245,6 +245,9 @@ class MediaMonitorCommon: return stdout.splitlines() def touch_index_file(self): + dirname = os.path.dirname(self.timestamp_file) + if not os.path.exists(dirname): + os.makedirs(dirname) open(self.timestamp_file, "w") def organize_new_file(self, pathname):