Subject: Re: KDE2: patch for mkdir w/ trailing "/"
To: None <skrll@netbsd.org, porten@kde.org>
From: Hubert Feyrer <hubert@feyrer.de>
List: tech-pkg
Date: 11/18/2000 03:34:38
Just when you thought you mailed out the right diff...
On Sat, 18 Nov 2000 hubert@feyrer.de wrote:
> +#ifdef __NetBSD__
> + base += target.mid(i - 1, pos - i ); /* no trailing '/'! */
^^^
This needs a "+1" in the NetBSD case, too, making it read:
base += target.mid(i - 1, pos - i + 1 ); /* leading '/', not trailing! */
The length stays the same, we just copy the slash before the component
instead of the one after it.
> +#else
> + base += target.mid(i, pos - i + 1);
> +#endif
> +
> // bail out if we encountered a problem
> if (stat(QFile::encodeName(base), &st) != 0)
- Hubert
--
Hubert Feyrer <hubert@feyrer.de>