Skip to content

Commit

Permalink
fix setting file attributes after zip extraction
Browse files Browse the repository at this point in the history
- otherwise the combine step looses the executable flag
  • Loading branch information
MartinNowak committed Dec 21, 2013
1 parent d072527 commit 647c2b7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions create_dmd_release/create_dmd_release.d
Expand Up @@ -1481,6 +1481,9 @@ string[] gitVersionedFiles(string path)
void extract(string archive, string outputDir)
{
import std.zip;
version (Posix) import core.sys.posix.sys.stat : setFileAttributes = chmod;
else version (Windows) import core.sys.windows.windows : setFileAttributes = SetFileAttributes;
else static assert(0, "unsupported platform");

infoMsg("Extracting "~displayPath(archive));

Expand All @@ -1497,6 +1500,7 @@ void extract(string archive, string outputDir)
if(verbose)
infoMsg(path);
std.file.write(path, am.expandedData);
setFileAttributes(toStringz(path), am.fileAttributes);
}
}

Expand Down

0 comments on commit 647c2b7

Please sign in to comment.