Changeset 1603
- Timestamp:
- Aug 6, 2011, 11:20:56 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/init.c
r1560 r1603 637 637 PSZ env; 638 638 CHAR dllfile[CCHMAXPATH]; 639 CHAR temp[CCHMAXPATH]; 639 640 ULONG size; 640 641 BOOL fSeparateParmsApp; … … 717 718 } 718 719 720 //Save the FM2 save directory name. This is the location of the ini, dat files etc. 721 save_dir2(temp); 722 pFM2SaveDirectory = xstrdup(temp, pszSrcFile, __LINE__); 719 723 // set up default root names for temp file storage and archive goodies 720 724 env = getenv("TMP"); … … 725 729 rc = DosQueryPathInfo(env, FIL_STANDARD, &fs3, sizeof(fs3)); 726 730 if (!rc) { 727 CHAR *enddir, *p, szTempName[CCHMAXPATH] , temp[CCHMAXPATH];731 CHAR *enddir, *p, szTempName[CCHMAXPATH]; 728 732 FILEFINDBUF3 ffb; 729 733 HDIR search_handle; 730 734 ULONG num_matches, ul; 731 735 732 //Save the FM2 save directory name. This is the location of the ini, dat files etc.733 save_dir2(temp);734 pFM2SaveDirectory = xstrdup(temp, pszSrcFile, __LINE__);735 736 strcpy(szTempName, env); 736 737 AddBackslashToPath(szTempName); 737 //if (szTempName[strlen(szTempName) - 1] != '\\')738 // strcat(szTempName, "\\");739 738 enddir = &szTempName[strlen(szTempName)]; 740 739 strcat(szTempName, "$FM2????."); … … 747 746 FILE_SYSTEM | FILE_READONLY | FILE_HIDDEN | 748 747 FILE_ARCHIVED, 749 750 748 &ffb, sizeof(ffb), &num_matches, FIL_STANDARD)) { 749 do { 751 750 strcpy(enddir, ffb.achName); 752 751 p = strrchr(szTempName, '.'); … … 761 760 } 762 761 } 763 764 while (!DosFindNext(search_handle,765 766 DosFindClose(search_handle);767 }762 } 763 while (!DosFindNext(search_handle, 764 &ffb, sizeof(ffb), &num_matches)); 765 DosFindClose(search_handle); 766 } 768 767 if (fs3.attrFile & FILE_DIRECTORY) { 769 768 strcpy(szTempName, env); … … 773 772 pTmpDir = xstrdup(szTempName, pszSrcFile, __LINE__); // if writable 774 773 else 775 pTmpDir = xstrdup(pFM2SaveDirectory, pszSrcFile, __LINE__); 776 } 774 pTmpDir = xstrdup(pFM2SaveDirectory, pszSrcFile, __LINE__); 777 775 } 778 776 } 777 } 778 else 779 pTmpDir = xstrdup(pFM2SaveDirectory, pszSrcFile, __LINE__); 779 780 // Check free space on TMP and FM2 Save drives 780 781 { 781 //ullTmpSpaceNeeded = 5120000;782 782 if (pTmpDir && CheckDriveSpaceAvail(pTmpDir, ullTmpSpaceNeeded, 0) == 1) { 783 783 if (CheckDriveSpaceAvail(pFM2SaveDirectory, ullTmpSpaceNeeded, 0) == 0){
Note:
See TracChangeset
for help on using the changeset viewer.