<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/fileutils/test_fileutils.rb, branch v3_2_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[ruby/fileutils] [Feature #18925] Add `ln_sr` method and `relative:` option to `ln_s`</title>
<updated>2022-11-25T01:03:57+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-11-25T01:03:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c6330cd32b7d02b4603080a2c53d64be9e05773c'/>
<id>c6330cd32b7d02b4603080a2c53d64be9e05773c</id>
<content type='text'>
https://github.com/ruby/fileutils/commit/5116088d5c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/fileutils/commit/5116088d5c
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for `sockaddr_un` on Windows. (#6513)</title>
<updated>2022-11-17T22:50:25+00:00</updated>
<author>
<name>Samuel Williams</name>
<email>samuel.williams@oriontransfer.co.nz</email>
</author>
<published>2022-11-17T22:50:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ea8a7287e2b96b9c24e5e89fe863e5bfa60bfdda'/>
<id>ea8a7287e2b96b9c24e5e89fe863e5bfa60bfdda</id>
<content type='text'>
* Windows: Fix warning about undefined if_indextoname()

* Windows: Fix UNIXSocket on MINGW and make .pair more reliable

* Windows: Use nonblock=true for read tests with scheduler

* Windows: Move socket detection from File.socket? to File.stat

Add S_IFSOCK to Windows and interpret reparse points accordingly.
Enable tests that work now.

* Windows: Use wide-char functions to UNIXSocket

This fixes behaviour with non-ASCII characters.
It also fixes deletion of temporary UNIXSocket.pair files.

* Windows: Add UNIXSocket tests for specifics of Windows impl.

* Windows: fix VC build due to missing _snwprintf

Avoid usage of _snwprintf, since it fails linking ruby.dll like so:

  linking shared-library x64-vcruntime140-ruby320.dll
  x64-vcruntime140-ruby320.def : error LNK2001: unresolved external symbol snwprintf
  x64-vcruntime140-ruby320.def : error LNK2001: unresolved external symbol vsnwprintf_l

whereas linking miniruby.exe succeeds.

This patch uses snprintf on the UTF-8 string instead.

Also remove branch GetWindowsDirectoryW, since it doesn't work.

* Windows: Fix dangling symlink test failures

Co-authored-by: Lars Kanis &lt;kanis@comcard.de&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Windows: Fix warning about undefined if_indextoname()

* Windows: Fix UNIXSocket on MINGW and make .pair more reliable

* Windows: Use nonblock=true for read tests with scheduler

* Windows: Move socket detection from File.socket? to File.stat

Add S_IFSOCK to Windows and interpret reparse points accordingly.
Enable tests that work now.

* Windows: Use wide-char functions to UNIXSocket

This fixes behaviour with non-ASCII characters.
It also fixes deletion of temporary UNIXSocket.pair files.

* Windows: Add UNIXSocket tests for specifics of Windows impl.

* Windows: fix VC build due to missing _snwprintf

Avoid usage of _snwprintf, since it fails linking ruby.dll like so:

  linking shared-library x64-vcruntime140-ruby320.dll
  x64-vcruntime140-ruby320.def : error LNK2001: unresolved external symbol snwprintf
  x64-vcruntime140-ruby320.def : error LNK2001: unresolved external symbol vsnwprintf_l

whereas linking miniruby.exe succeeds.

This patch uses snprintf on the UTF-8 string instead.

Also remove branch GetWindowsDirectoryW, since it doesn't work.

* Windows: Fix dangling symlink test failures

Co-authored-by: Lars Kanis &lt;kanis@comcard.de&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/fileutils] Revert "FileUtils.rm* methods swallows only Errno::ENOENT when force is true"</title>
<updated>2022-11-07T11:25:25+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2022-08-30T07:02:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=72c7dba436a5ebb53dfb37f3e400e84b0c2f9f45'/>
<id>72c7dba436a5ebb53dfb37f3e400e84b0c2f9f45</id>
<content type='text'>
This reverts commit https://github.com/ruby/fileutils/commit/fa65d676ece9.

This caused some incompatibility problems in real-world cases.
https://bugs.ruby-lang.org/issues/18784#change-98927
https://bugs.ruby-lang.org/issues/18784#change-98967

https://github.com/ruby/fileutils/commit/42983c2553
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit https://github.com/ruby/fileutils/commit/fa65d676ece9.

This caused some incompatibility problems in real-world cases.
https://bugs.ruby-lang.org/issues/18784#change-98927
https://bugs.ruby-lang.org/issues/18784#change-98967

https://github.com/ruby/fileutils/commit/42983c2553
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/fileutils] FileUtils.rm* methods swallows only Errno::ENOENT when force is true</title>
<updated>2022-08-23T07:52:41+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2022-07-26T12:31:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=983115cf3c8f75b1afbe3274f02c1529e1ce3a81'/>
<id>983115cf3c8f75b1afbe3274f02c1529e1ce3a81</id>
<content type='text'>
... instead of any StandardError.

To behave like the standard `rm` command, it should only ignore
exceptions about not existing files, not every exception. This should
make debugging some errors easier, because the expectation is that `rm
-rf` will succeed if and only if, all given files (previously existent
or not) are removed. However, due to this exception swallowing, this is
not always the case.

From the `rm` man page

&gt; COMPATIBILITY
&gt;
&gt; The rm utility differs from historical implementations in that the -f
&gt; option only masks attempts to remove non-existent files instead of
&gt; masking a large variety of errors.

https://github.com/ruby/fileutils/commit/fa65d676ec

Co-Authored-By: David Rodríguez &lt;deivid.rodriguez@riseup.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
... instead of any StandardError.

To behave like the standard `rm` command, it should only ignore
exceptions about not existing files, not every exception. This should
make debugging some errors easier, because the expectation is that `rm
-rf` will succeed if and only if, all given files (previously existent
or not) are removed. However, due to this exception swallowing, this is
not always the case.

From the `rm` man page

&gt; COMPATIBILITY
&gt;
&gt; The rm utility differs from historical implementations in that the -f
&gt; option only masks attempts to remove non-existent files instead of
&gt; masking a large variety of errors.

https://github.com/ruby/fileutils/commit/fa65d676ec

Co-Authored-By: David Rodríguez &lt;deivid.rodriguez@riseup.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/fileutils] Narrow the scope of ensure</title>
<updated>2022-08-23T07:52:40+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2022-07-26T12:23:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=96562a517d3373466ec306b5f821a41f4758d2a6'/>
<id>96562a517d3373466ec306b5f821a41f4758d2a6</id>
<content type='text'>
The ensure in postorder_traverse was added for [Bug #6756].
The intention was to try to delete the parent directory if it failed to
get the children. (It may be possible to delete the directory if it is
empty.)

However, the ensure region rescue'ed not only "failure to get children"
but also "failure to delete each child". Thus, the following raised
Errno::ENOTEMPTY, but we expect it to raise Errno::EACCES.

```
$ mkdir foo
$ touch foo/bar
$ chmod 555 foo
$ ruby -rfileutils -e 'FileUtils.rm_rf("foo")'
```

This changeset narrows the ensure region so that it rescues only
"failure to get children".

https://github.com/ruby/fileutils/commit/ec5d3b84ea
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The ensure in postorder_traverse was added for [Bug #6756].
The intention was to try to delete the parent directory if it failed to
get the children. (It may be possible to delete the directory if it is
empty.)

However, the ensure region rescue'ed not only "failure to get children"
but also "failure to delete each child". Thus, the following raised
Errno::ENOTEMPTY, but we expect it to raise Errno::EACCES.

```
$ mkdir foo
$ touch foo/bar
$ chmod 555 foo
$ ruby -rfileutils -e 'FileUtils.rm_rf("foo")'
```

This changeset narrows the ensure region so that it rescues only
"failure to get children".

https://github.com/ruby/fileutils/commit/ec5d3b84ea
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/fileutils] Fix the test permission of "test_rm_rf"</title>
<updated>2022-08-23T07:52:39+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2022-07-26T12:17:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=073f3b7e0ad94657c04573983affb9d66e6bff2c'/>
<id>073f3b7e0ad94657c04573983affb9d66e6bff2c</id>
<content type='text'>
The test was added for [Bug #6756]. The ticket insisted
`FileUtils.rm_rf` should delete an empty directory even if its
permission is 000. However, the test tried to delete a directory with
permission 700.

https://github.com/ruby/fileutils/commit/d6c2ab2c01
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The test was added for [Bug #6756]. The ticket insisted
`FileUtils.rm_rf` should delete an empty directory even if its
permission is 000. However, the test tried to delete a directory with
permission 700.

https://github.com/ruby/fileutils/commit/d6c2ab2c01
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/fileutils] Fix mkdir_p hanging on Windows when trying to create a file on a offline drive</title>
<updated>2022-08-22T01:12:25+00:00</updated>
<author>
<name>David Rodríguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2022-08-01T18:35:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=70f69f85395f5735429cd45136d7de2742f08b72'/>
<id>70f69f85395f5735429cd45136d7de2742f08b72</id>
<content type='text'>
https://github.com/ruby/fileutils/commit/9cc6a082d7
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/fileutils/commit/9cc6a082d7
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/fileutils] Add an octal prefix to clarify to be octal</title>
<updated>2022-07-19T08:33:44+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-07-19T07:50:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ee1d2b276abbf6b03d862952a949302672a470a9'/>
<id>ee1d2b276abbf6b03d862952a949302672a470a9</id>
<content type='text'>
https://github.com/ruby/fileutils/commit/332025bc02

Co-Authored-By: David Rodríguez &lt;deivid.rodriguez@riseup.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/fileutils/commit/332025bc02

Co-Authored-By: David Rodríguez &lt;deivid.rodriguez@riseup.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Use Test::Unit::AssertionFailedError instead of MiniTest::Assertion for test-unit migration</title>
<updated>2021-09-06T09:34:15+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2021-09-06T09:34:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=940a19e4b3ae1ce466c3bc912175b4ef7c615c53'/>
<id>940a19e4b3ae1ce466c3bc912175b4ef7c615c53</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Try to test with rake-13.0.2 again.</title>
<updated>2020-12-19T07:53:18+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2020-12-19T07:53:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=349e79bae02a8a161c06ba5f6fa203d609f6e8b9'/>
<id>349e79bae02a8a161c06ba5f6fa203d609f6e8b9</id>
<content type='text'>
  [ruby/fileutils] Make verbose output go to stdout instead of stderr

  This reverts commit 510df47f5f7f83918d3aa00316c8a5b959d80d7c.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  [ruby/fileutils] Make verbose output go to stdout instead of stderr

  This reverts commit 510df47f5f7f83918d3aa00316c8a5b959d80d7c.
</pre>
</div>
</content>
</entry>
</feed>
