Project/Project.py

branch
Py2 comp.
changeset 2847
1843ef6e2656
parent 2791
a9577f248f04
parent 2798
c349fa5fe7c0
child 2911
ce77f0b1ee67
diff -r b852fe4d153a -r 1843ef6e2656 Project/Project.py
--- a/Project/Project.py	Mon Aug 12 19:41:53 2013 +0200
+++ b/Project/Project.py	Mon Aug 12 22:21:53 2013 +0200
@@ -4257,10 +4257,18 @@
                 return  # don't overwrite
         
         # build the list of entries
-        lst = []
+        lst_ = []
         for key in \
             ["SOURCES", "FORMS", "RESOURCES", "TRANSLATIONS", "INTERFACES", "OTHERS"]:
-            lst.extend(self.pdata[key])
+            lst_.extend(self.pdata[key])
+        lst = []
+        for entry in lst_:
+            if os.path.isdir(self.getAbsolutePath(entry)):
+                lst.extend([self.getRelativePath(p) for p in 
+                    Utilities.direntries(self.getAbsolutePath(entry), True)])
+                continue
+            else:
+                lst.append(entry)
         lst.sort()
         if "PKGLIST" in lst:
             lst.remove("PKGLIST")
@@ -4272,7 +4280,7 @@
             else:
                 newline = self.getEolString()
             pkglistFile = open(pkglist, "w", encoding="utf-8", newline=newline)
-            pkglistFile.write("\n".join(lst))
+            pkglistFile.write("\n".join([Utilities.fromNativeSeparators(f) for f in lst]))
             pkglistFile.write("\n")  # ensure the file ends with an empty line
             pkglistFile.close()
         except IOError as why:

eric ide

mercurial