alsapid: dont treat ENOENT on unlink as error

If handle was created but its name was not set, then symlink will not exist.
aconnect behaves like this.
This commit is contained in:
Nedko Arnaudov 2010-10-31 00:26:32 +03:00
parent 920f1b7225
commit 683b8f4d4f
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ static void destroy_symlink(int alsa_client_id)
alsapid_compose_src_link(alsa_client_id, src);
//printf("'%s'\n", src);
if (unlink(src) != 0)
if (unlink(src) != 0 && errno != ENOENT)
{
fprintf(stderr, "unlink(\"%s\") failed with %d (%s)", src, errno, strerror(errno));
}