[Digikam-devel] problem with the kio

Renchi Raju renchi.raju at gmail.com
Thu Aug 25 01:53:35 BST 2005


On 8/24/05, Tom Albers <tomalbers at kde.nl> wrote:
> when i have a folder which is readonly and trying to move an item to another
> folder, i get (a bit cryptic) warning that that is not possible.
> 
> It enters the routine at line +/- 812 of digikamalbums.cpp from the kio:
> 
>         if (( errno == EACCES ) || (errno == EPERM))
>         {
>             error( KIO::ERR_ACCESS_DENIED, dst.url() );
>         }
> 
> Which points to the dst.url(), but the problem lies in the src.url(), so the
> warning should say that. How can we change that to prevent users (like me)
> spending four hours tracking down the problem (like me).  I guess it should
> enter the ERR_CANNOT_DELETE, but it doesn't ;-)

Not sure what your question really is? If bugs were always very easy
to fix, then there most software would be flawless :).

In the above case, the problem occurred with the renaming of the src
url to the dst url. According to the documentation of rename, if the
eacces or eperm errno is set, then its either src or dst. Now, the
kio::error with key identifier doesn't provide for both src and
destination urls to be represented in the string. We can always
override the default to compose a string on our own after checking
permissions for both src and dst.

renchi



More information about the Digikam-devel mailing list