Changeset 18032

Show
Ignore:
Timestamp:
03.12.2008 12:07:28 (11 years ago)
Author:
oranfry
Message:

wrapper to check that the temp directory was properly created

Files:
1 modified

Legend:

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

    r17982 r18032  
    298298    string tempdir = ""; tempdir.append( tmp ); tempdir.append( "\\Greenstone-" ); tempdir.append( id ); 
    299299    const char* tmpdir = tempdir.c_str(); 
    300     _mkdir( tmpdir ); 
     300    if ( _mkdir( tmpdir ) != 0 ) { 
     301        string title = "Failed to create the temp folder."; 
     302        string message = "Failed to create the temp folder.\nPlease run this installer from a folder you have permission to write to."; 
     303        MessageBox(NULL, message.c_str(), title.c_str(), MB_OK); 
     304        return -1; 
     305    } 
    301306    SetFileAttributes(tmpdir, FILE_ATTRIBUTE_HIDDEN); 
    302307    SetCurrentDirectory(tmpdir);