diff --git a/gns3server/handlers/index_handler.py b/gns3server/handlers/index_handler.py index 6dfd6c15..8c6a486f 100644 --- a/gns3server/handlers/index_handler.py +++ b/gns3server/handlers/index_handler.py @@ -90,7 +90,7 @@ class IndexHandler: static = get_static_path(filename) if not os.path.exists(static): - static = get_static_path('web-ui/index.html') + static = get_static_path(os.path.join('web-ui', 'index.html')) yield from response.file(static) diff --git a/tests/utils/test_static.py b/tests/utils/test_static.py index 0174275c..8fec0f25 100644 --- a/tests/utils/test_static.py +++ b/tests/utils/test_static.py @@ -15,8 +15,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +import os + from gns3server.utils.static import get_static_path def test_get_static_path(): - assert get_static_path('test').endswith('gns3server/static/test') + expected = os.path.join('gns3server', 'static', 'test') + assert get_static_path('test').endswith(expected)