Skip to content

Commit

Permalink
Handle empty -o option in the command line. openMVG#146
Browse files Browse the repository at this point in the history
  • Loading branch information
pmoulon committed Jul 8, 2014
1 parent a67b7c2 commit 9fed46a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/software/SfM/main_CreateList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,19 @@ int main(int argc, char **argv)
return EXIT_FAILURE;
}

if (sOutputDir.empty())
{
std::cerr << "\nInvalid output directory" << std::endl;
return EXIT_FAILURE;
}

if ( !stlplus::folder_exists( sOutputDir ) )
{
stlplus::folder_create( sOutputDir );
if ( !stlplus::folder_create( sOutputDir ))
{
std::cerr << "\nCannot create output directory" << std::endl;
return EXIT_FAILURE;
}
}

std::vector<std::string> vec_image = stlplus::folder_files( sImageDir );
Expand Down

0 comments on commit 9fed46a

Please sign in to comment.