equal
deleted
inserted
replaced
772 def LoadProject(self, ProjectPath, logger): |
772 def LoadProject(self, ProjectPath, logger): |
773 """ |
773 """ |
774 Load a project contained in a folder |
774 Load a project contained in a folder |
775 @param ProjectPath: path of the project folder |
775 @param ProjectPath: path of the project folder |
776 """ |
776 """ |
|
777 if os.path.basename(ProjectPath) == "": |
|
778 ProjectPath = os.path.dirname(ProjectPath) |
777 # Verify that project contains a PLCOpen program |
779 # Verify that project contains a PLCOpen program |
778 plc_file = os.path.join(ProjectPath, "plc.xml") |
780 plc_file = os.path.join(ProjectPath, "plc.xml") |
779 if not os.path.isfile(plc_file): |
781 if not os.path.isfile(plc_file): |
780 return "Folder choosen doesn't contain a program. It's not a valid project!" |
782 return "Folder choosen doesn't contain a program. It's not a valid project!" |
781 # Load PLCOpen file |
783 # Load PLCOpen file |