Thread (7 messages) flat view 7 messages, 3 authors, 2016-06-15

Re: [PATCH] Expand the rename(2) workaround in mingw to cover case change in filename

From: Alex Riesen <hidden>
Date: 2016-06-15 22:46:55

2009/6/9 Johannes Sixt [off-list ref]:
Alex Riesen schrieb:
quoted
2009/6/8 Johannes Schindelin [off-list ref]:
quoted
On Mon, 8 Jun 2009, Alex Riesen wrote:
quoted
NOT TESTED. Can't. My Windows broke again. Not even compile-tested.
Yes, that is pretty easy to see as you first used pold/pnew and then
src/dst.
Yep.
quoted
I minimally fixed up your patch (it now uses strbuf), and added a
test-case.

This test-case is actually crucial: it shows that your patch is not
enough: the culprit is this code in builtin-mv.c:167--168:

               else if (lstat(dst, &st) == 0) {
                       bad = "destination exists";
Ah, thanks. Missed that completely.
That's the reason why I think any work-around for this problem is not
worth it.
What is the lstat is for, anyway?
If you want to be cross-platfrom, make up your mind about file names in
advance.
I suspect it is the other way around. Some platforms just hate the idea
of being ported to. Or its designers have poor imagination and never
though about the fact that other platforms exist.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help