Skip to content
Snippets Groups Projects
Commit a547346e authored by Abdallah Toumji's avatar Abdallah Toumji
Browse files

Resolved a problem for linux users

parent 7139af3a
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,7 @@ Functions:
import json
import os
from re import search
import platform
def get_entities(experiments_files, project_directory):
......@@ -386,7 +387,10 @@ class Tools:
The metadata of the file in json format
"""
if platform.system() == 'Windows':
layout_path = path.replace('/', '\\')
else:
layout_path = path
metadata = self.layout.get()[self.layout.get(return_type='filename').index(layout_path)].get_metadata()
metadata = json.dumps(metadata,
skipkeys=True,
......@@ -405,7 +409,10 @@ class Tools:
The pybids bids file
"""
if platform.system() == 'Windows':
layout_path = path.replace('/', '\\')
else:
layout_path = path
return self.layout.get()[self.layout.get(return_type='filename').index(layout_path)]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment