Changeset 18032 for release-kits


Ignore:
Timestamp:
2008-12-03T12:07:28+13:00 (15 years ago)
Author:
oranfry
Message:

wrapper to check that the temp directory was properly created

File:
1 edited

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);
Note: See TracChangeset for help on using the changeset viewer.