Merge pull request #65 from liamcottle/master

Fix serving NomadNet pages from Windows
This commit is contained in:
markqvist 2025-01-13 15:06:33 +01:00 committed by GitHub
commit b5bf730e07
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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"]