(erase_file): revert a change in previous; if the ccache is a symlink,

kdestroy should remove it


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12995 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
2003-10-13 13:03:12 +00:00
parent dcc546f00e
commit 41d0b9d1bd

View File

@@ -202,6 +202,10 @@ erase_file(const char *filename)
else
return errno;
}
if (unlink(filename) < 0) {
close (fd);
return errno;
}
ret = fstat (fd, &sb2);
if (ret < 0) {
close (fd);
@@ -215,17 +219,6 @@ erase_file(const char *filename)
return EPERM;
}
if (unlink(filename) < 0) {
close (fd);
return errno;
}
ret = fstat (fd, &sb2);
if (ret < 0) {
close (fd);
return errno;
}
/* there are still hard links to this file */
if (sb2.st_nlink != 0) {