* fhandler_disk_file.cc (fhandler_disk_file::link): Only append .lnk

if the original device had one, too.  Add comment.

	* fhandler_socket.cc (fhandler_socket::fstat): Always return a size of
	0 on sockets.
This commit is contained in:
Corinna Vinschen
2009-10-12 11:57:29 +00:00
parent 2072888e66
commit d358c9e9b0
3 changed files with 16 additions and 1 deletions

View File

@ -1210,7 +1210,12 @@ fhandler_disk_file::link (const char *newpath)
char new_buf[nlen + 5];
if (!newpc.error)
{
if (pc.is_lnk_special ())
/* If the original file is a lnk special file (except for sockets),
and if the original file has a .lnk suffix, add one to the hardlink
as well. */
if (pc.is_lnk_special () && !pc.issocket ()
&& RtlEqualUnicodePathSuffix (pc.get_nt_native_path (),
&ro_u_lnk, TRUE))
{
/* Shortcut hack. */
stpcpy (stpcpy (new_buf, newpath), ".lnk");