1
0
forked from 0ad/0ad

fix dir_cancel_watch issue: fail silently if watch=0 (happens if directory mounted only from archive, i.e. there's no real directory to watch)

This was SVN commit r1524.
This commit is contained in:
janwas 2004-12-18 03:45:12 +00:00
parent 323ca1746f
commit 5bb24a387f
2 changed files with 2 additions and 2 deletions

View File

@ -419,7 +419,7 @@ struct TDir
TDir()
{
#ifndef NO_DIR_WATCH
watch = -1;
watch = 0; // not yet initialized
#endif
loc = 0;
exact_dir_name = 0; // safety

View File

@ -247,7 +247,7 @@ fail:
int dir_cancel_watch(const intptr_t reqnum)
{
if(reqnum < 0)
if(reqnum <= 0)
return ERR_INVALID_PARAM;
Watch* w = watches[reqnum];