Don't crash when work directory doesn't exist ... create it.
This commit is contained in:
parent
1a4b54a331
commit
0b156394fa
1 changed files with 9 additions and 2 deletions
|
@ -67,9 +67,13 @@ int main( int argc, char **argv ) {
|
||||||
|
|
||||||
FG_LOG( FG_GENERAL, FG_DEBUG, "Opening " << argv[1] << " for reading." );
|
FG_LOG( FG_GENERAL, FG_DEBUG, "Opening " << argv[1] << " for reading." );
|
||||||
|
|
||||||
|
// make work directory
|
||||||
|
string work_dir = argv[2];
|
||||||
|
string command = "mkdir -p " + work_dir;
|
||||||
|
system( command.c_str() );
|
||||||
|
|
||||||
// initialize persistant polygon counter
|
// initialize persistant polygon counter
|
||||||
string counter_file = argv[2];
|
string counter_file = work_dir + "/polygon.counter";
|
||||||
counter_file += "/polygon.counter";
|
|
||||||
poly_index_init( counter_file );
|
poly_index_init( counter_file );
|
||||||
|
|
||||||
// initialize structure for building gpc polygons
|
// initialize structure for building gpc polygons
|
||||||
|
@ -261,6 +265,9 @@ int main( int argc, char **argv ) {
|
||||||
|
|
||||||
|
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.6 1999/03/02 01:04:28 curt
|
||||||
|
// Don't crash when work directory doesn't exist ... create it.
|
||||||
|
//
|
||||||
// Revision 1.5 1999/03/01 15:36:28 curt
|
// Revision 1.5 1999/03/01 15:36:28 curt
|
||||||
// Tweaked a function call name in "names.hxx".
|
// Tweaked a function call name in "names.hxx".
|
||||||
//
|
//
|
||||||
|
|
Loading…
Add table
Reference in a new issue