(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:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user