Changeset 1554 for trunk/dll/init.c


Ignore:
Timestamp:
Nov 21, 2010, 12:35:35 AM (15 years ago)
Author:
Gregg Young
Message:

Check that pTmpDir IsValid and recreate if not found; Fixes hangs caused by temp file creation failures. (Ticket 440)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/init.c

    r1553 r1554  
    101101                entries in the tree container, fix related semaphore performance using
    102102                combination of event and mutex semaphores
     103  20 Nov 10 GKY Check that pTmpDir IsValid and recreate if not found; Fixes hangs caused
     104                by temp file creation failures.
    103105
    104106***********************************************************************/
     
    582584    strcpy(s, pFM2SaveDirectory);
    583585  AddBackslashToPath(s);
    584   //if (s[strlen(s) - 1] != '\\')
    585   //  strcat(s, "\\");
    586586  enddir = &s[strlen(s)];
    587587  strcat(s, "$FM2LI$T.");
     
    729729      ULONG num_matches, ul;
    730730
     731      //Save the FM2 save directory name. This is the location of the ini, dat files etc.
     732      save_dir2(temp);
     733      pFM2SaveDirectory = xstrdup(temp, pszSrcFile, __LINE__);
    731734      strcpy(szTempName, env);
    732735      AddBackslashToPath(szTempName);
     
    767770        rc = DosCreateDir(szTempName, 0);
    768771        if (!rc)
    769           pTmpDir = xstrdup(szTempName, pszSrcFile, __LINE__);  // if writable
     772          pTmpDir = xstrdup(szTempName, pszSrcFile, __LINE__);  // if writable
     773        else
     774          pTmpDir = xstrdup(pFM2SaveDirectory, pszSrcFile, __LINE__);
    770775        }
    771776      }
    772777    }
    773 
    774   //Save the FM2 save directory name. This is the location of the ini, dat files etc.
    775   {
    776     CHAR temp[CCHMAXPATH];
    777     save_dir2(temp);
    778     pFM2SaveDirectory = xstrdup(temp, pszSrcFile, __LINE__);
    779   }
    780778  // Check free space on TMP and FM2 Save drives
    781779  {
Note: See TracChangeset for help on using the changeset viewer.