From 7d18a103cfc69a6b392696e65b1b546e9907fbd9 Mon Sep 17 00:00:00 2001 From: liamcottle Date: Fri, 20 Dec 2024 23:03:31 +1300 Subject: [PATCH] don't try to execute nomadnet pages when running on windows --- nomadnet/Node.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nomadnet/Node.py b/nomadnet/Node.py index 70b455c..37eb691 100644 --- a/nomadnet/Node.py +++ b/nomadnet/Node.py @@ -1,4 +1,6 @@ import os +import sys + import RNS import time import threading @@ -159,7 +161,8 @@ class Node: try: if request_allowed: RNS.log("Serving page: "+file_path, RNS.LOG_VERBOSE) - if os.access(file_path, os.X_OK): + is_windows = sys.platform == "win32" + if is_windows is False and os.access(file_path, os.X_OK): env_map = {} if "PATH" in os.environ: env_map["PATH"] = os.environ["PATH"]