git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@11616 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -549,7 +549,7 @@ void ReadRestart::file_search(char *infile, char *outfile)
|
||||
|
||||
char *pattern = new char[strlen(filename) + 16];
|
||||
|
||||
if (ptr = strchr(filename,'%')) {
|
||||
if ((ptr = strchr(filename,'%'))) {
|
||||
*ptr = '\0';
|
||||
sprintf(pattern,"%s%s%s",filename,"base",ptr+1);
|
||||
*ptr = '%';
|
||||
@ -574,7 +574,7 @@ void ReadRestart::file_search(char *infile, char *outfile)
|
||||
DIR *dp = opendir(dirname);
|
||||
if (dp == NULL)
|
||||
error->one(FLERR,"Cannot open dir to search for restart file");
|
||||
while (ep = readdir(dp)) {
|
||||
while ((ep = readdir(dp))) {
|
||||
if (strstr(ep->d_name,begin) != ep->d_name) continue;
|
||||
if ((ptr = strstr(&ep->d_name[nbegin],end)) == NULL) continue;
|
||||
if (strlen(end) == 0) ptr = ep->d_name + strlen(ep->d_name);
|
||||
|
||||
Reference in New Issue
Block a user