Description: Fix internal module path

Author: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Bug-Ubuntu: https://bugs.launchpad.net/bugs/2069170
Forwarded: no
Last-Update: 2024-06-25
---

--- gnome-activity-journal-1.0.0.orig/gnome-activity-journal
+++ gnome-activity-journal-1.0.0/gnome-activity-journal
@@ -46,8 +46,12 @@ def update_sys_path():
     # this file residing in $prefix/bin, we expect to find the remaining code
     # in $prefix/share/gnome-activity-journal/.
     if os.path.basename(RUN_DIR) == 'bin':
-        sys.path.insert(0, os.path.join(os.path.dirname(RUN_DIR),
+        if os.path.basename(os.path.dirname(RUN_DIR)) == 'usr':
+            sys.path.insert(0, os.path.join(os.path.dirname(RUN_DIR),
                                         'share/gnome-activity-journal'))
+        else:
+            sys.path.insert(0, os.path.join(os.path.dirname(RUN_DIR),
+                                        'usr/share/gnome-activity-journal'))
 
 def check_zeitgeist_version():
     from src.external import CLIENT, CLIENT_VERSION
