python watchdog got weired file extentions

Viewed 15

i need to file name with extentions.

it's my Handler

class Handler(FileSystemEventHandler):
    ...
    def on_modified(self, event):
        if not event.is_directory:
            origin_file_path = event.src_path
            file_name = os.path.basename(event.src_path)
            print(file_name)
        return super().on_modified(event)
    ...

it's result like this

/usr/myproject/test.py

but, suddenly result return changed like this

/usr/myproject/.test.py.wcP5y9

how can i solved this problem?

0 Answers
Related