[#7055] More on VC++ 2005 — Austin Ziegler <halostatue@...>

Okay. I've got Ruby compiling. I'm attempting to get everything in

17 messages 2006/01/05
[#7058] Re: More on VC++ 2005 — nobuyoshi nakada <nobuyoshi.nakada@...> 2006/01/06

Hi,

[#7084] mathn: ugly warnings — hadmut@... (Hadmut Danisch)

Hi,

22 messages 2006/01/10
[#7097] Re: mathn: ugly warnings — Daniel Berger <Daniel.Berger@...> 2006/01/10

Hadmut Danisch wrote:

[#7098] Design contracts and refactoring (was Re: mathn: ugly warnings) — mathew <meta@...> 2006/01/10

Daniel Berger wrote:

[#7118] Re: Design contracts and refactoring (was Re: mathn: ugly warnings) — mathew <meta@...> 2006/01/12

*Dean Wampler *<deanwampler gmail.com> writes:

[#7226] Fwd: Re: Question about massive API changes — "Sean E. Russell" <ser@...>

Hello,

23 messages 2006/01/28
[#7228] Re: Question about massive API changes — Caleb Tennis <caleb@...> 2006/01/28

>

FileUtils.mv does not unlink source file when moving over filesystem boundary

From: Pav Lucistnik <pav@...>
Date: 2006-01-16 01:37:40 UTC
List: ruby-core #7162
Hi,

I found a bug in ruby 1.8.4 in FileUtils.mv() function. When moving a
file from one filesystem to another, it does not unlink the source file.
Ruby 1.8.2 worked fine.

Patch against 1.8.4 release:

--- lib/fileutils.rb.orig	Sun Nov 20 02:23:41 2005
+++ lib/fileutils.rb	Mon Jan 16 02:08:47 2006
@@ -501,6 +501,7 @@
           File.rename s, d
         rescue Errno::EXDEV
           copy_entry s, d, true
+          File.unlink s
         end
       rescue SystemCallError
         raise unless options[:force]

Testcase:

require 'fileutils'
FileUtils.mv '/home/pav/91771', '/var/tmp/91771'

when

Filesystem      Size    Used   Avail Capacity  Mounted on
/dev/ad10s2e    104G     90G     11G    89%    /usr
/dev/ad10s2d    248M    173M     55M    76%    /var

/home and /var are on different file systems leaves 91771 in /home/pav.

Operating system is FreeBSD 6.0, if that matters.

-- 
Pav Lucistnik <pav@oook.cz>
              <pav@FreeBSD.org>

Knight: We shall say Ny! again to you if you do not appease us.
Arthur: All right. What do you want?
Knight: We want... a shruberry!

In This Thread

Prev Next