Sfoglia il codice sorgente

replace all backslash with slash when path is generated

mikymod 12 anni fa
parent
commit
3dd68fd16a
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  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)
 				abs_path = os.path.join(dirname, filename)
 				resource_name = os.path.relpath(abs_path, self.m_root_path)
 				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
 				# Filter resource names by type
 				if resource_name.endswith(resource_extensions):
 				if resource_name.endswith(resource_extensions):
 					self.m_resources.append(resource_name)
 					self.m_resources.append(resource_name)