diff --git a/src/main.py b/src/main.py
index 7f5c1b33..5c69c884 100644
--- a/src/main.py
+++ b/src/main.py
@@ -3,6 +3,7 @@ import sys
 import stat
 import time
 import logging
+from util.compat import *
 
 startup_errors = []
 def startupError(msg):
@@ -54,12 +55,12 @@ def importBundle(bundle):
         else:
             prefix = ''
         top_2 = list(set(filter(lambda f: len(f)>0,
-                                map(lambda f: f.removeprefix(prefix).split('/')[0], all_files))))
+                                map(lambda f: removeprefix(f, prefix).split('/')[0], all_files))))
         for d in top_2:
             if isValidAddress(d):
                 logging.info(f'unpack {d} into {config.data_dir}')
                 for fname in filter(lambda f: f.startswith(prefix+d) and not f.endswith('/'), all_files):
-                    tgt = config.data_dir + '/' + fname.removeprefix(prefix)
+                    tgt = config.data_dir + '/' + removeprefix(fname, prefix)
                     logging.info(f'-- {fname} --> {tgt}')
                     info = zf.getinfo(fname)
                     info.filename = tgt
diff --git a/src/util/compat.py b/src/util/compat.py
new file mode 100644
index 00000000..f41e67b2
--- /dev/null
+++ b/src/util/compat.py
@@ -0,0 +1,16 @@
+import sys
+
+if sys.version_info.major == 3 and sys.version_info.minor < 9:
+    def removeprefix(s, prefix, /):
+        if s.startswith(prefix):
+            return s[len(prefix):]
+        return s
+    def removesuffix(s, suffix, /):
+        if s.endswith(suffix):
+            return s[:-len(suffix)]
+        return s
+else:
+    def removeprefix(s, prefix, /):
+        return s.removeprefix(prefix)
+    def removesuffix(s, suffix, /):
+        return s.removesuffix(suffix)