git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@11616 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2014-03-10 15:45:25 +00:00
parent df0c8d061f
commit 3d6ac732ad
14 changed files with 42 additions and 34 deletions

View File

@ -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);