mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-25 22:52:24 +03:00
minor bug fix about loading plugin
This commit is contained in:
parent
dee1cee10d
commit
a7a5b297ac
1 changed files with 3 additions and 4 deletions
|
@ -14,8 +14,6 @@ class FileEventHandler(FileSystemEventHandler):
|
||||||
def process(self, event):
|
def process(self, event):
|
||||||
|
|
||||||
if event.src_path != self.path[:-1]:
|
if event.src_path != self.path[:-1]:
|
||||||
if event.event_type in ('created', 'modified', 'moved'):
|
|
||||||
plu_path = event.src_path
|
|
||||||
if event.event_type == 'moved':
|
if event.event_type == 'moved':
|
||||||
plu_path = event.dest_path
|
plu_path = event.dest_path
|
||||||
result = Commander().set_event([None, 'load', '-p', plu_path.replace(self.path, '')])
|
result = Commander().set_event([None, 'load', '-p', plu_path.replace(self.path, '')])
|
||||||
|
@ -27,5 +25,6 @@ class FileEventHandler(FileSystemEventHandler):
|
||||||
os.kill(int(System.Ahenk.get_pid_number()), signal.SIGALRM)
|
os.kill(int(System.Ahenk.get_pid_number()), signal.SIGALRM)
|
||||||
|
|
||||||
def on_any_event(self, event):
|
def on_any_event(self, event):
|
||||||
|
|
||||||
if event.is_directory:
|
if event.is_directory:
|
||||||
self.process(event)
|
self.process(event)
|
||||||
|
|
Loading…
Reference in a new issue