[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Mintlib bug (?): rmdir delets symlinks to nonempty directories



On 02/25/13 21:57, Ole wrote:
Am Freitag, den 22.02.2013, 12:42 +0100 schrieb Alan Hourihane <alanh@fairlite.co.uk>:

The previous quickstat call should not follow the symlink.

I'll get the fix committed.


Hm, I've updated the mintlib, did an make install and
it still looks like it deletes symlinks (at least on an ext2 partition).

Test code:

#include <stdio.h>

int main(int argc, char **argv)
{
        int err;

        if(argc < 2){
                printf("Usage: testrm <directory>\n");
                return(0);
        }

        printf("deleting %s...", argv[1]);
        err = rmdir(argv[1]);
        printf("%d\n", err);
        return(0);
}

Works as expected here, and says.....

deleting kkk...-1

as "kkk" was a symlink. And it still exists.

Are you sure you are linking to your new libc.a ?

Alan.