1. Anthony Tuininga
  2. cx_Freeze


Anthony Tuininga  committed 40fb1ab

Ensure that the target path is not an absolute path and use an additional
variable for the os.path.split() call simply for easier readability.

  • Participants
  • Parent commits 8954b3e
  • Branches default

Comments (0)

Files changed (1)

File cx_Freeze/freezer.py

View file
  • Ignore whitespace
                 source, target = spec
             source = os.path.normpath(source)
             if not target:
-                target = os.path.split(source)[1]
+                dirName, target = os.path.split(source)
+            elif os.path.isabs(target):
+                raise ConfigError("target path for include file may not be "
+                        "an absolute file")
             processedSpecs.append((source, target))
         return processedSpecs