Skip to content

Commit 1d45701

Browse files
committed
fix: run_macro didn't work for files that aren't in a sub directory
1 parent fda6077 commit 1d45701

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tagstudio/src/qt/ts_qt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,7 @@ def run_macro(self, name: str, entry_id: int):
947947
"""Runs a specific Macro on an Entry given a Macro name."""
948948
entry = self.lib.get_entry(entry_id)
949949
path = self.lib.library_dir / entry.path / entry.filename
950-
source = entry.path.parts[0]
950+
source = "" if entry.path == Path(".") else entry.path.parts[0]
951951
if name == "sidecar":
952952
self.lib.add_generic_data_to_entry(
953953
self.core.get_gdl_sidecar(path, source), entry_id

0 commit comments

Comments
 (0)