diff options
Diffstat (limited to 'lib/un.rb')
-rw-r--r-- | lib/un.rb | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -196,7 +196,7 @@ end def install setup("pm:o:g:") do |argv, options| - (mode = options.delete :m) and options[:mode] = mode + (mode = options.delete :m) and options[:mode] = /\A\d/ =~ mode ? mode.oct : mode options[:preserve] = true if options.delete :p (owner = options.delete :o) and options[:owner] = owner (group = options.delete :g) and options[:group] = group @@ -216,7 +216,8 @@ end def chmod setup do |argv, options| - mode = argv.shift.oct + mode = argv.shift + mode = /\A\d/ =~ mode ? mode.oct : mode FileUtils.chmod mode, argv, options end end |