bug-global
[Top][All Lists]
Advanced

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

Re: symbolic links, unreadable files, skip


From: Shigio YAMAGUCHI
Subject: Re: symbolic links, unreadable files, skip
Date: Fri, 28 Aug 2015 09:26:29 +0900

> You ignore files when stat fails, why not ignore files when
> fopen fails?

Because a dead symbolic link has no substance. Even if it's ignored,
nothing is lost. (Stat(1) is used for detecting a dead symbolic link.)

Unlike that, an unreadable file means that something critical has 
occurred. In that case, gtags stop its job, and give the user a chance 
to check the disk, permission and etc.

Regards
Shigio


2015-08-27 21:38 GMT+09:00 Jason Hood <address@hidden>:
On 27/08/2015 21:33, Shigio YAMAGUCHI wrote:

> Isn't there a way to decide whether it is a dead link?

Sure, test if fopen fails. :)

> It is not opentoken() but parsers that call die().

Yeah, that's what I meant.

> It might be difficult to force plug-in parsers not to die.

Plug-in parsers can do what they want, that's not the issue.

You ignore files when stat fails, why not ignore files when
fopen fails?  That's what the attached patch does.  Oh, I
was also able to successfully use skip on the broken link,
so I don't know what went wrong there.

--
Jason.



--
Shigio YAMAGUCHI <address@hidden>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3

reply via email to

[Prev in Thread] Current Thread [Next in Thread]