Commit 2159ee0e authored by Alexandre Burgoni's avatar Alexandre Burgoni
Browse files

Fix macos absolute paths

parent f697c58c
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -479,10 +479,12 @@ def create_jobs_doc(arg_job=None):
        for job in jobs:
            create_job_doc(job)


def run_watcher(watch_path):
    def on_modified(event):
        logging.info(f"New modification detected on {event.src_path}")
        create_jobs_doc(event.src_path.split("/")[1])
        path = event.src_path.split("/")
        create_jobs_doc(path[len(path) - 2])

    event_handler = RegexMatchingEventHandler(["^.*\.md$"], ignore_directories=False, case_sensitive=True)
    event_handler.on_modified = on_modified
@@ -497,6 +499,7 @@ def run_watcher(watch_path):
        observer.stop()
    observer.join()


def main():
    """
    Main function, multiple-purpose: