diff --git a/app-text/dos2unix/DOS2UNIX.C b/app-text/dos2unix/DOS2UNIX.C index 83f84e8f1..0b4944069 100644 --- a/app-text/dos2unix/DOS2UNIX.C +++ b/app-text/dos2unix/DOS2UNIX.C @@ -95,7 +95,7 @@ int dos2u (char *path) unlink (temppath); return TRUE; } - if (link (temppath,path) == -1) + if (rename (temppath,path) == -1) { fprintf (stderr, "Dos2Unix: Problems renaming '%s' to '%s'\n", temppath, path); fprintf (stderr, " However, file '%s' remains\n", temppath); diff --git a/app-text/dos2unix/UNIX2DOS.C b/app-text/dos2unix/UNIX2DOS.C index 842fb31e2..47aae3402 100644 --- a/app-text/dos2unix/UNIX2DOS.C +++ b/app-text/dos2unix/UNIX2DOS.C @@ -93,7 +93,7 @@ int u2dos (char *path) unlink (temppath); return TRUE; } - if (link (temppath,path) == -1) + if (rename (temppath,path) == -1) { fprintf (stderr, "Unix2Dos: Problems renaming '%s' to '%s'\n", temppath, path); fprintf (stderr, " However, file '%s' remains\n", temppath);