This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: nftw: No such file or directory after changing file's links


On Sat, 2015-05-09 at 21:28 -0400, Brian J. Murrell wrote:
> Hi,
> 
> I have a program which use nftw() to descend a file tree.  As it's
> walking downward, it's looking for identical files in a parallel tree.
> When it comes across an identical file in the parallel tree, it removes
> it and then creates a link from the tree that is being walked into the
> parallel tree.
> 
> Yes, I am saving space between two file trees that have many identical
> files by creating links between them.
> 
> But what I am finding is that after I have created the link, when my
> "fn()" returns nftw() fails out with a "No such file or directory".
> 
> I suppose it has something to do with modifying the directory that
> nftw() is currently processing by adding to the link counts of files in
> the directory being processed.

You can disregard this question.  It turns out that my callback was
actually returning a failure when it should not have been.  I can only
plead too many programming languages with their semantic differences in
boolean handling and function call return success I guess.  In any case,
definitely PEBKAC here.

Cheers,
b.

Attachment: signature.asc
Description: This is a digitally signed message part


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]