Fixed dos2unix and unix2dos.

This commit is contained in:
Scott McCreary
2009-11-30 16:21:39 +00:00
parent f69b181939
commit b00d806875
2 changed files with 2 additions and 2 deletions

View File

@@ -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);

View File

@@ -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);