[sos-devel] Should _expand_copy_spec() return broken symlinks

Bryn M. Reeves bmr at redhat.com
Thu Apr 13 12:27:32 UTC 2017


On Thu, Apr 13, 2017 at 01:57:04PM +0200, Louis Bouchard wrote:
> and _expand_copy_spec() will return /etc/blkid.tab, since the file exists, but
> os.stat() will fail since there is nobody at the other end of the symlink.
> 
> Obviously, it is an O/S bug that needs to be fixed, but should
> _expand_copy_spec() return something when there is no _real_ file at the other end ?

Yes: it's valuable information for the person trying to diagnose the bug
in the operating system (if we can't see the symlink we can't see that
it points to an invalid path).

The stat handling code just needs to be fixed so that we assume a zero
size for files that we fail to stat.

Regards,
Bryn.
 




More information about the sos-devel mailing list