https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112010-04-02T08:32:49ZRuby Issue Tracking SystemRuby master - Feature #2190: FileUtils::chmod - allow symbolic modehttps://bugs.ruby-lang.org/issues/2190?journal_id=96862010-04-02T08:32:49Zznz (Kazuhiro NISHIYAMA)
<ul><li><strong>Category</strong> set to <i>lib</i></li><li><strong>Target version</strong> set to <i>2.0.0</i></li></ul><p>=begin</p>
<p>=end</p> Ruby master - Feature #2190: FileUtils::chmod - allow symbolic modehttps://bugs.ruby-lang.org/issues/2190?journal_id=110632010-05-17T18:07:26Ztakkanm (δΈζ ηι)takkanm@gmail.com
<ul><li><strong>File</strong> <a href="/attachments/988">0001-FileUtils-chmod-to-symbolic-mode-added.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/988/0001-FileUtils-chmod-to-symbolic-mode-added.patch">0001-FileUtils-chmod-to-symbolic-mode-added.patch</a> added</li></ul><p>=begin<br>
Hi. I'm takkanm.</p>
<p>FileUtils:: chmod () that I wrote a patch to use the symbolic mode.<br>
How about this?<br>
=end</p> Ruby master - Feature #2190: FileUtils::chmod - allow symbolic modehttps://bugs.ruby-lang.org/issues/2190?journal_id=112252010-05-25T15:15:07Zsunaku (Suraj Kurapati)sunaku@gmail.com
<ul></ul><p>=begin<br>
Thanks for your patch, takkanm! I hope the Ruby developers will<br>
accept it into Ruby trunk. I have one small suggestion for you:</p>
<pre><code>def fu_mode(mode, path)
</code></pre>
<ul>
<li>mode.class == String ? symbolic_modes_to_i(mode, path) : mode</li>
</ul>
<ul>
<li>mode.is_a?(String) ? symbolic_modes_to_i(mode, path) : mode<br>
end</li>
</ul>
<p>Greetings.<br>
=end</p> Ruby master - Feature #2190: FileUtils::chmod - allow symbolic modehttps://bugs.ruby-lang.org/issues/2190?journal_id=139242010-10-28T16:40:36Zdolzenko (Evgeniy Dolzhenko)dolzenko@gmail.com
<ul></ul><p>=begin<br>
+1 Would like to see this it's way to the core, except that <code>current_file_mode</code> function doesn't seem to be really used anyway and can be removed:</p>
<ul>
<li>def symbolic_modes_to_i(modes, path)</li>
<li>current_mode = current_file_mode(path)</li>
<li>current_mode = (File.stat(path).mode & 07777)<br>
...<br>
=end</li>
</ul> Ruby master - Feature #2190: FileUtils::chmod - allow symbolic modehttps://bugs.ruby-lang.org/issues/2190?journal_id=167192011-04-30T03:37:13Zanthezium (ted cooper)anthezium@gmail.com
<ul></ul><p>=begin<br>
+1<br>
we have a million <code>chmod ...</code> expressions lurking because of this omission. please accept this into trunk!<br>
=end</p> Ruby master - Feature #2190: FileUtils::chmod - allow symbolic modehttps://bugs.ruby-lang.org/issues/2190?journal_id=167212011-04-30T03:54:21Zkosaki (Motohiro KOSAKI)kosaki.motohiro@gmail.com
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Assigned</i></li><li><strong>Assignee</strong> set to <i>kosaki (Motohiro KOSAKI)</i></li></ul><p>=begin<br>
Hi</p>
<p>This request seems very reasonable to me. I'll review the patch later.<br>
=end</p> Ruby master - Feature #2190: FileUtils::chmod - allow symbolic modehttps://bugs.ruby-lang.org/issues/2190?journal_id=167412011-05-02T01:16:24Zkosaki (Motohiro KOSAKI)kosaki.motohiro@gmail.com
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li></ul><p>r31407</p> Ruby master - Feature #2190: FileUtils::chmod - allow symbolic modehttps://bugs.ruby-lang.org/issues/2190?journal_id=167482011-05-03T20:35:36Zkosaki (Motohiro KOSAKI)kosaki.motohiro@gmail.com
<ul></ul><p>I slightly change the testcase at r31415. because FreeBSD don't change sticky bit.</p>
<p>Thx.</p>