use correct method to get the file path
This commit is contained in:
@@ -62,18 +62,8 @@ class FindInFilesWidget(Tab):
|
||||
#
|
||||
|
||||
def _open_file(self, index: QModelIndex):
|
||||
|
||||
path = []
|
||||
i = index
|
||||
while i.isValid():
|
||||
path.append(i.data())
|
||||
i = i.parent()
|
||||
path.reverse()
|
||||
file = Path()
|
||||
for s in path:
|
||||
file = file / s
|
||||
|
||||
if file.is_file():
|
||||
file = self._model.filePath(index)
|
||||
if Path(file).is_file():
|
||||
PluginRegistry.execute_single("open_file", f"{file}")
|
||||
|
||||
def _select_base_dir(self):
|
||||
|
||||
Reference in New Issue
Block a user