PATCH: Bug 52115: rename of directory misbehaves

David Faure faure at
Tue Jan 13 23:03:04 GMT 2004

On Tuesday 13 January 2004 23:53, Dawit A. wrote:
> BTW, you need the rename dialog patch as well. Otherwise the 
> inncorrect URL is shown!

Ah yes, I fixed the fix there too (to use the exact same sentences as in the usual case,
for less confusion), but forgot to commit. Done now.

> > Also, the KURL(m_dest,newPath) looks wrong. The 2nd arg of that KURL ctor
> > doesn't take paths (this would lead to bugs with files containing e.g. '#'
> > in their name). m_dest.setPath(newPath) should be enough.
> Ah okay. But that still does not prevent people from typing the path in 
> manually, either by mistake or otherwise, no ? I did not see any validator on 
> the lineedit of the rename dialog which I think we will need at some point in 
> the future...

You misunderstood. '#' is perfectly fine in a filename. The point is that
KURL(m_dest,newPath) is wrong. KURL(2 args) takes two encoded URLs,
no paths. A path and a URL can both be put in a QString, but the semantics
differ (and '#' is one example of why a path and a url are not the same thing).

> Looks okay. Can you add the ERR_FILE_ALREADY_EXISTS check as well then ?
Done already (at least in CVS, but also in the patch IIRC?).

> On related note it is sad none of the common remote protocols, ftp, fish, 
> sftp, gracefully deal with renaming of directories or files to an existing 
> name. More things to fix :(
Hmm, what's the problem? Wrong stat() implementation?

David FAURE, faure at, sponsored by Trolltech to work on KDE,
Konqueror (, and KOffice (

More information about the kde-core-devel mailing list