Changeset 19009


Ignore:
Timestamp:
2009-04-16T15:32:12+12:00 (12 years ago)
Author:
oranfry
Message:

going back to using the TMP dir for temp files so that installation from CD works

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release-kits/shared/windows/wrapper/wrapper.cpp

    r18246 r19009  
    290290    spoof_progress( SPOOF_TIME );
    291291   
    292     // Now we are generating temporary files in a folder inside the current directory,
    293     // instead of creating this folder in the system Temp directory(referenced by TMP)
    294     // And we make this folder hidden
    295     char* tmp = NULL; //char* tmp = getenv( "TMP" );
    296     tmp = _getcwd(tmp, 1000);
     292    //using the users TMP directory for temp files rather than the current directory so
     293    //installation from cd works
     294    //char* tmp = NULL;
     295    //tmp = _getcwd(tmp, 1000);
     296    char* tmp = getenv( "TMP" );
    297297    char id[6]; for( int i=0; i<5; i++ ) id[i] = (char)((rand()%26) + 97); id[5] = '\0'; //id for this instance
    298298    string tempdir = ""; tempdir.append( tmp ); tempdir.append( "\\Greenstone-" ); tempdir.append( id );
     
    304304        return -1;
    305305    }
    306     SetFileAttributes(tmpdir, FILE_ATTRIBUTE_HIDDEN);
     306    //SetFileAttributes(tmpdir, FILE_ATTRIBUTE_HIDDEN);
    307307    SetCurrentDirectory(tmpdir);
    308308    delete tmp; //  deallocate memory
Note: See TracChangeset for help on using the changeset viewer.