From b5bd11ca5a8c4813caf9bdfadf18503764059d8c Mon Sep 17 00:00:00 2001
From: zzz <zzz@i2pmail.org>
Date: Mon, 23 Jan 2023 09:24:01 -0500
Subject: [PATCH] i2psnark standalone: Fix running from outside the directory

Reported by Qubes
ref: http://zzz.i2p/topics/3555
---
 apps/i2psnark/launch-i2psnark | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/apps/i2psnark/launch-i2psnark b/apps/i2psnark/launch-i2psnark
index 2cbd939008..c72de0b279 100755
--- a/apps/i2psnark/launch-i2psnark
+++ b/apps/i2psnark/launch-i2psnark
@@ -35,5 +35,6 @@ raiseopenfilesulimit() {
 
 raiseopenfilesulimit
 
-I2P="."
-java $JAVA_OPTS -jar "$I2P/i2psnark.jar"
+I2P="`dirname $0`"
+cd "$I2P"
+java $JAVA_OPTS -jar i2psnark.jar
-- 
GitLab