[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `rename-file' with leading spaces in filename
From: |
martin rudalics |
Subject: |
Re: `rename-file' with leading spaces in filename |
Date: |
Mon, 02 Jan 2006 10:52:53 +0100 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
> Suppose I have a file called "c:/foo"
FOO 10 02.01.06 7:45 foo
where "FOO" is the short filename (aka 8+3 alias) and "foo" is the long
filename.
> Doing M-x rename-file RET c:/foo RET c:/ foo
>
> At that point, which relevant files exist?
FOO 10 02.01.06 7:45 foo
The short filename remains unaffected by the renaming operation, the
additional space between "7:45" and "foo" shows that the long filename
was changed.
>
> M-x rename-file RET c:/ foo RET c:/foo
>
> gets me:
>
> File c:/foo already exists; rename to it anyway? (y or n)
>
> Can you determine which primitive concludes that it exists
> and see what arguments it got?
>
The FindFirstFile call in
fh = FindFirstFile (name, &wfd);
around line 2430 in w32.c finds "c:/foo" due to the fact that
FindFirstFile is allowed to return a file whose short filename matches
the parameter "name" (provided - as I suspect - it does not find a file
whose long filename matches "name").
- Re: `rename-file' with leading spaces in filename,
martin rudalics <=