From 150c296f6e58df4aa43f72c4216d041b56a28bbc Mon Sep 17 00:00:00 2001 From: Evgeniy Kozhuhovskiy Date: Sun, 16 Jan 2005 13:50:15 +0000 Subject: [PATCH] *** empty log message *** --- source/ChangeLog | 2 ++ source/bforce/nodelist.c | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/source/ChangeLog b/source/ChangeLog index f5b1de5..592be4e 100644 --- a/source/ChangeLog +++ b/source/ChangeLog @@ -1,6 +1,8 @@ 2005-01-16 Evgeniy Kozhuhovskiy * bforce/nodelist.c (nodelist_open): fixed mask detection + * bforce/nodelist.c (nodelist_open): added tmpseekdir, contains + full path to currently seeked nodelist 2005-01-12 Andrey Slusar diff --git a/source/bforce/nodelist.c b/source/bforce/nodelist.c index d660634..cbf9575 100644 --- a/source/bforce/nodelist.c +++ b/source/bforce/nodelist.c @@ -296,6 +296,7 @@ s_nodelist *nodelist_open(const char *dir, char *name, int mode) if( strcmp(name+strlen(name)-4, ".999") == 0 ) { char tmpseek[MAX_NAME]; + char tmpseekdir[MAX_NAME]; char tmpname[MAX_NAME]; struct dirent *ndir; DIR *ndirstream; @@ -305,6 +306,7 @@ s_nodelist *nodelist_open(const char *dir, char *name, int mode) } else { + strncpy(tmpname, name, sizeof(tmpname)); struct stat ndfile; time_t lasttime = 0; @@ -318,7 +320,11 @@ s_nodelist *nodelist_open(const char *dir, char *name, int mode) { if( (strncmp(tmpseek, tmpname, (strlen(tmpseek)-3) ) == 0) ) { - if( stat(tmpseek, &ndfile) ) + + strncpy(tmpseekdir, dir, sizeof(tmpseekdir)); + strncat(tmpseekdir, tmpseek, sizeof(tmpseekdir)); + + if( (stat(tmpseekdir, &ndfile)) == 0 ) { if( ndfile.st_ctime > lasttime ) {