Procházet zdrojové kódy

Merge branch 'polybuild-packedItem-pathing' of https://github.com/christopherreed/Polycode into pullreq_testing

Ivan Safrin před 12 roky
rodič
revize
a249408b8d
1 změnil soubory, kde provedl 4 přidání a 2 odebrání
  1. 4 2
      Tools/Contents/polybuild/Source/polybuild.cpp

+ 4 - 2
Tools/Contents/polybuild/Source/polybuild.cpp

@@ -406,11 +406,13 @@ int main(int argc, char **argv) {
 			for(int i=0; i < packed->length; i++) {
 				ObjectEntry *entryPath = (*(*packed)[i])["path"];
 				ObjectEntry *entryType = (*(*packed)[i])["type"];
+				ObjectEntry *entrySource = (*(*packed)[i])["source"];
 				if(entryPath && entryType) {
+					if (!entrySource) entrySource = entryPath;
 					if(entryType->stringVal == "folder") {
-						addFolderToZip(z, entryPath->stringVal, entryPath->stringVal, false);
+						addFolderToZip(z, entrySource->stringVal, entryPath->stringVal, false);
 					} else {
-						addFileToZip(z, entryPath->stringVal, entryPath->stringVal, false);
+						addFileToZip(z, entrySource->stringVal, entryPath->stringVal, false);
 					}
 				}
 			}