Permalink
Browse files

! handles now path name with spaces

  • Loading branch information...
1 parent 8d0adcf commit eae5bbffccfdf9db04997eb40f611212126f57c8 Patrick Marchi committed Aug 7, 2011
Showing with 5 additions and 5 deletions.
  1. +1 −1 Rakefile
  2. +4 −4 lib/osx_acl/dir.rb
View
@@ -17,7 +17,7 @@ spec = Gem::Specification.new do |s|
# Change these as appropriate
s.name = "osx_acl"
- s.version = "0.1.1"
+ s.version = "0.1.2"
s.summary = "Simplify the management of ACLs on OS X, by restricting operation to common tasks."
s.author = "Patrick Marchi"
s.email = "mail@patrickmarchi.ch"
View
@@ -33,7 +33,7 @@ def initialize(dir, options={})
end
def get
- acl = run 'ls -dle', dir
+ acl = run 'ls -dle', "'#{dir}'"
# @acl = parse(run 'ls -dle', dir)
acl
end
@@ -46,7 +46,7 @@ def parse(list)
#
def clear(options)
r = options[:recursive] ? '-R' : ''
- run 'chmod', r, '-N', dir
+ run 'chmod', r, '-N', "'#{dir}'"
end
# Set aces on dir
@@ -56,8 +56,8 @@ def clear(options)
def set(aces)
aces.reverse.each do |actor, pset, flags|
inherit, recursive = parse_flags(flags)
- run "chmod +a '#{actor} allow #{build_pset(pset, inherit)}' #{dir}"
- run "find #{dir} -mindepth 1 -exec chmod +ai '#{actor} allow #{build_pset(pset, inherit)}' {} \\;" if recursive
+ run "chmod +a '#{actor} allow #{build_pset(pset, inherit)}' '#{dir}'"
+ run "find '#{dir}' -mindepth 1 -exec chmod +ai '#{actor} allow #{build_pset(pset, inherit)}' {} \\;" if recursive
end
end

0 comments on commit eae5bbf

Please sign in to comment.