fix(hotreload): only add dest_package_name
to the cogs_to_reload
list if dest_package_name != src_package_name
This commit is contained in:
parent
5adc7a2c7b
commit
01466378c4
1 changed files with 3 additions and 1 deletions
|
@ -91,7 +91,9 @@ class HotReloadHandler(RegexMatchingEventHandler):
|
|||
if isinstance(event, FileSystemMovedEvent):
|
||||
dest = f" to {event.dest_path}"
|
||||
relative_dest_path = Path(event.dest_path).relative_to(self.path)
|
||||
cogs_to_reload.append(relative_dest_path.parts[0])
|
||||
dest_package_name = relative_dest_path.parts[0]
|
||||
if dest_package_name != src_package_name:
|
||||
cogs_to_reload.append(dest_package_name)
|
||||
else:
|
||||
dest = ""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue