From a871b5dbe7fad2145a4421db906e81db28dd4d2a Mon Sep 17 00:00:00 2001
From: Sergei Bondarenko <grez911@gmail.com>
Date: Mon, 22 May 2017 20:31:44 +0300
Subject: [PATCH] fix issue #936

os.path.join(*file_path.split("/")) construction drops leading slash from string thus making absolute path relative. It leads into problems in case if data_dir differs from directory where is zeronet installed.
---
 src/Debug/DebugMedia.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Debug/DebugMedia.py b/src/Debug/DebugMedia.py
index 497d06cb..6ab40a5f 100644
--- a/src/Debug/DebugMedia.py
+++ b/src/Debug/DebugMedia.py
@@ -85,7 +85,7 @@ def merge(merged_path):
                     return False  # No coffeescript compiler, skip this file
 
                 # Replace / with os separators and escape it
-                file_path_escaped = helper.shellquote(os.path.join(*file_path.split("/")))
+                file_path_escaped = helper.shellquote(file_path.replace(os.path.sep, "/"))
 
                 if "%s" in config.coffeescript_compiler:  # Replace %s with coffeescript file
                     command = config.coffeescript_compiler % file_path_escaped