[PATCH] Cygwin: make path_conv::isdevice() return false on socket files

Corinna Vinschen corinna-cygwin@cygwin.com
Fri Jul 19 08:28:00 GMT 2019


Hi Ken,

On Jul 18 20:02, Ken Brown wrote:
> As a result, socket files are no longer treated as lnk special files.
> This prevents rename() from adding ".lnk" when renaming a socket file.
> 
> Remove a redundant !pc.issocket() from fhandler_disk_file::link().

I see what you're doing here, but it's totally non-obvious from the
commit message why this fixes the problem and doesn't introduce weird
side-effects.  Changing isdevice() also changes the definition of
is_auto_device(), which is used in symlink_worker().  

To ease the pain during later bisecting session, it would be kind to
explain detailed why the problem occurs and why your patch is the right
thing to do.

An editorial note: While looking into your patch it occured to me that
it would be about time to go over all the is***device() methods and
clean up the mess.  E.g., is_fs_device() is used by is_lnk_special()
only, is_auto_device() doesn't have much meaning, some funcs have
underscores, some don't.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20190719/f7b17a54/attachment.sig>


More information about the Cygwin-patches mailing list