Changeset 1075 for trunk/dll/init.c


Ignore:
Timestamp:
Jul 18, 2008, 6:44:01 AM (17 years ago)
Author:
Gregg Young
Message:

Debulked TMP code; Added comments;

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/init.c

    r1074 r1075  
    4949                all the details view settings (both the global variables and those in the
    5050                DIRCNRDATA struct) into a new struct: DETAILS_SETTINGS.
     51  16 JUL 08 GKY Use TMP directory for temp files
    5152  17 Jul 08 SHL Reduce code bulk in fUseTmp setup
    5253
     
    455456  /* cleanup */
    456457  static CHAR s[CCHMAXPATH];
    457   CHAR *enddir;
     458  CHAR *enddir, szTempFile[CCHMAXPATH];
    458459  HDIR search_handle;
    459460  ULONG num_matches;
     
    538539    DosFindClose(search_handle);
    539540  }
    540   if (fUseTmp) {
    541     CHAR szTempFile[CCHMAXPATH];
    542 
    543     BldFullPathName(szTempFile, pTmpDir, "$FM2PLAY.$$$");
    544     DosForceDelete(szTempFile);
    545   }
    546   else
    547     DosForceDelete("$FM2PLAY.$$$");
    548 
     541  BldFullPathName(szTempFile, pTmpDir, "$FM2PLAY.$$$");
     542  DosForceDelete(szTempFile);
    549543  EndNote();
    550544  if (FM3ModHandle)
     
    666660      if (fs3.attrFile & FILE_DIRECTORY) {
    667661        // 17 Jul 08 SHL fixme to check writable someday
    668         BldFullPathName(ArcTempRoot, env, fAmAV2 ? "$AV$ARC$" : "$FM$ARC$");
    669662        pTmpDir = xstrdup(env, pszSrcFile, __LINE__);
    670663        fUseTmp = TRUE;
     
    672665    }
    673666  }
    674   if (!fUseTmp) {
    675     if (!fAmAV2)
    676       strcpy(ArcTempRoot, "$FM$ARC$");
    677     else
    678       strcpy(ArcTempRoot, "$AV$ARC$");
    679   }
     667  BldFullPathName(ArcTempRoot, env, fAmAV2 ? "$AV$ARC$" : "$FM$ARC$");
    680668
    681669  /* initialize random number generator */
Note: See TracChangeset for help on using the changeset viewer.