UBCSailbot / raye-global-pathfinding

UBC Sailbot's Global Pathfinding Repository: A* pathfinding that creates sailing paths with minimized length and desirable wind speeds throughout.
MIT License
5 stars 1 forks source link

NEW MEMBER TASK: Fix output_csvs so that you it creates a directory if not already exists #60

Open tylerlum opened 2 years ago

tylerlum commented 2 years ago

Right now, the --output_csvs option requires an existing directory and fails silently if it doesn't exist. This is confusing and undesirable. It should create the directory (or directories) if it doesn't already exist or do the regular behavior if it does exist.

tylerlum commented 2 years ago

The relevant code is in src/grib/gribParse.cpp

https://github.com/UBCSailbot/global-pathfinding/blob/master/src/grib/gribParse.cpp#L176 Replace this with code that checks if folder exists, and creates it if it doesn't. Try to make it work on arbitrary recursive files. Eg. for input_folder/inner_input/inside shoud make 3 folders