Fixed search failing in some dirs; fixed pathbar autofilling with one found path

This commit is contained in:
2023-09-16 01:18:36 -05:00
parent b5d1bbeccd
commit df688d919e
10 changed files with 132 additions and 80 deletions

View File

@@ -60,13 +60,6 @@ class IPCServer:
msg = conn.recv()
try:
if "SEARCH_DONE|" in msg:
ts, ret_code = msg.split("SEARCH_DONE|")[1].strip().split("|", 1)
timestamp = float(ts)
if self.fsearch_time_stamp or self.grep_time_stamp:
if (timestamp > self.fsearch_time_stamp) or (timestamp > self.grep_time_stamp):
GLib.idle_add(self.stop_spinner, (ret_code,), priority=GLib.PRIORITY_HIGH_IDLE)
if "SEARCH|" in msg:
ts, file = msg.split("SEARCH|")[1].strip().split("|", 1)
timestamp = float(ts)
@@ -78,6 +71,10 @@ class IPCServer:
timestamp = float(ts)
if data and (timestamp > self.grep_time_stamp):
GLib.idle_add(self._load_grep_ui, data, priority=GLib.PRIORITY_HIGH_IDLE)
if "SEARCH_DONE|" in msg:
ts, ret_code = msg.split("SEARCH_DONE|")[1].strip().split("|", 1)
GLib.idle_add(self.stop_spinner, (ret_code,), priority=GLib.PRIORITY_HIGH_IDLE)
except Exception as e:
print( repr(e) )