mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Added handling of executable bit from tar entry.
This commit is contained in:
parent
82c18d8c1f
commit
c11128ff5e
1 changed files with 10 additions and 0 deletions
|
@ -143,8 +143,18 @@ public class UntarAction extends ProvisioningAction {
|
||||||
FileOutputStream outStream = new FileOutputStream(outFile);
|
FileOutputStream outStream = new FileOutputStream(outFile);
|
||||||
tarIn.copyEntryContents(outStream);
|
tarIn.copyEntryContents(outStream);
|
||||||
outStream.close();
|
outStream.close();
|
||||||
|
|
||||||
|
// Set last modified time from the tar entry
|
||||||
long lastModified = tarEntry.getModTime().getTime();
|
long lastModified = tarEntry.getModTime().getTime();
|
||||||
outFile.setLastModified(lastModified);
|
outFile.setLastModified(lastModified);
|
||||||
|
|
||||||
|
// Set the executable bits from the tar entry
|
||||||
|
// we let the umask determine the r/w
|
||||||
|
int mode = tarEntry.getMode();
|
||||||
|
boolean exec = (mode & 0x111) != 0;
|
||||||
|
boolean execOwner = (mode & 0x11) == 0;
|
||||||
|
outFile.setExecutable(exec, execOwner);
|
||||||
|
|
||||||
fileList.add(outFile);
|
fileList.add(outFile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue