Переглянути джерело

replace all backslash with slash when path is generated

mikymod 12 роки тому
батько
коміт
3dd68fd16a
1 змінених файлів з 4 додано та 0 видалено
  1. 4 0
      tools/pycrown/Repository.py

+ 4 - 0
tools/pycrown/Repository.py

@@ -124,6 +124,10 @@ class Repository:
 				abs_path = os.path.join(dirname, filename)
 				resource_name = os.path.relpath(abs_path, self.m_root_path)
 
+				# Normalize resource name, OSs != Windows/Linux may need
+				# additional processing
+				resource_name = resource_name.replace("\\", "/")
+
 				# Filter resource names by type
 				if resource_name.endswith(resource_extensions):
 					self.m_resources.append(resource_name)