Port of revision 51902 in release25-maint to the trunk
diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py
index 083209b..a581814 100755
--- a/Mac/BuildScript/build-installer.py
+++ b/Mac/BuildScript/build-installer.py
@@ -945,6 +945,7 @@
     ref, isDirectory = Carbon.File.FSPathMakeRef(filePath)
 
     if isDirectory:
+        return
         tmpPath = os.path.join(filePath, "Icon\r")
         if not os.path.exists(tmpPath):
             fp = open(tmpPath, 'w')