[#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

>

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

From: Jacob Fugal <lukfugl@...>
Date: 2006-01-16 18:42:23 UTC
List: ruby-core #7167
On 1/16/06, ara.t.howard@noaa.gov <ara.t.howard@noaa.gov> wrote:
> to emulate mv with copy really is shocking.

Am I mistaken, or isn't that how the OS handles move across filesystem
boundaries anyways? You'll notice this chunk of code (copy_entry,
unlink) only happens in the rescue block for Errno::EXDEV.

> at minimum this code should do something like
>
>    def transfer_entry s, d, hidden = true, ext = "tmp"
>      dirname, basename = File.split d
>      tmp = File.join dirname, "#{ '.' if hidden }#{ basename }.#{ ext }"
>      copy_entry s, tmp, true
>      File.rename tmp, d
>    end
>
>      rescue Errno::EXDEV
>        transfer_entry s, d
>        File.unlink s
>      end

I don't see how this is significantly different. What's the point of
copying to a tmp file and then renaming the tmp file versus just
copying directly to the destination?

Jacob Fugal


In This Thread