From: martin rudalics <rudalics@gmx.at>
Cc: emacs-devel@gnu.org
Subject: Re: `rename-file' with leading spaces in filename
Date: Mon, 02 Jan 2006 10:52:53 +0100 [thread overview]
Message-ID: <43B8F7F5.8030804@gmx.at> (raw)
In-Reply-To: <E1EsST2-0007xO-NL@fencepost.gnu.org>
> 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").
next prev parent reply other threads:[~2006-01-02 9:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-30 14:20 `rename-file' with leading spaces in filename martin rudalics
2005-12-30 18:41 ` Eli Zaretskii
2006-01-02 9:48 ` martin rudalics
2006-01-02 15:51 ` Eli Zaretskii
2006-01-03 9:47 ` martin rudalics
2006-01-03 18:35 ` Eli Zaretskii
2006-01-04 9:43 ` martin rudalics
2005-12-30 22:11 ` Richard M. Stallman
2006-01-02 9:52 ` martin rudalics [this message]
2006-01-02 15:38 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43B8F7F5.8030804@gmx.at \
--to=rudalics@gmx.at \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.