mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
make-snapshot: make permissions uniform
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
dabbdcfd6d
commit
6b5695fef9
1 changed files with 4 additions and 1 deletions
|
@ -167,20 +167,23 @@ def tar_create(tarball, dir)
|
|||
Dir.glob("#{dir}/**/*", File::FNM_DOTMATCH) do |path|
|
||||
next if File.basename(path) == "."
|
||||
s = File.stat(path)
|
||||
mode = 0644
|
||||
case
|
||||
when s.file?
|
||||
type = nil
|
||||
size = s.size
|
||||
mode |= 0111 if s.executable?
|
||||
when s.directory?
|
||||
path += "/"
|
||||
type = dir_type
|
||||
size = 0
|
||||
mode |= 0111
|
||||
else
|
||||
next
|
||||
end
|
||||
name, prefix = w.split_name(path)
|
||||
h = header.new(name: name, prefix: prefix, typeflag: type,
|
||||
mode: s.mode, size: size, mtime: s.mtime,
|
||||
mode: mode, size: size, mtime: s.mtime,
|
||||
uname: uname, gname: gname)
|
||||
f.write(h)
|
||||
if size > 0
|
||||
|
|
Loading…
Reference in a new issue