mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-18 12:29:32 +08:00
* fhandler_disk_file.cc (fhandler_disk_file::link): Drop faking hardlink
creation on filesystems not supporting hardlinks.
This commit is contained in:
parent
991caa7310
commit
6cabe044dd
@ -1,3 +1,8 @@
|
|||||||
|
2009-09-21 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* fhandler_disk_file.cc (fhandler_disk_file::link): Drop faking hardlink
|
||||||
|
creation on filesystems not supporting hardlinks.
|
||||||
|
|
||||||
2009-09-20 Christopher Faylor <me+cygwin@cgf.cx>
|
2009-09-20 Christopher Faylor <me+cygwin@cgf.cx>
|
||||||
|
|
||||||
* dcrt0.cc (dll_crt0_1): Add another hack to REALLY make sure that
|
* dcrt0.cc (dll_crt0_1): Add another hack to REALLY make sure that
|
||||||
|
@ -1249,17 +1249,9 @@ fhandler_disk_file::link (const char *newpath)
|
|||||||
{
|
{
|
||||||
if (status == STATUS_INVALID_DEVICE_REQUEST)
|
if (status == STATUS_INVALID_DEVICE_REQUEST)
|
||||||
{
|
{
|
||||||
/* FS doesn't support hard links. Try to copy file. */
|
/* FS doesn't support hard links. Linux returns EPERM. */
|
||||||
WCHAR pcw[(pc.get_nt_native_path ()->Length / sizeof (WCHAR)) + 1];
|
set_errno (EPERM);
|
||||||
WCHAR newpcw[(newpc.get_nt_native_path ()->Length / sizeof (WCHAR))
|
return -1;
|
||||||
+ 1];
|
|
||||||
if (!CopyFileW (pc.get_wide_win32_path (pcw),
|
|
||||||
newpc.get_wide_win32_path (newpcw), TRUE))
|
|
||||||
{
|
|
||||||
__seterrno ();
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
SetFileAttributesW (newpcw, pc.file_attributes ());
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user