Bug with folder path ending by '/' or '\' fixed
authorlbessard
Mon, 30 Jun 2008 17:38:28 +0200
changeset 190 be969d4694c7
parent 189 48ba1ae12ffd
child 191 5b1fa0e06284
Bug with folder path ending by '/' or '\' fixed
plugger.py
--- a/plugger.py	Mon Jun 30 17:04:25 2008 +0200
+++ b/plugger.py	Mon Jun 30 17:38:28 2008 +0200
@@ -774,6 +774,8 @@
         Load a project contained in a folder
         @param ProjectPath: path of the project folder
         """
+        if os.path.basename(ProjectPath) == "":
+            ProjectPath = os.path.dirname(ProjectPath)
         # Verify that project contains a PLCOpen program
         plc_file = os.path.join(ProjectPath, "plc.xml")
         if not os.path.isfile(plc_file):