Skip to content

Commit

Permalink
Fixed a bug trying to create map_object files if map_objects director…
Browse files Browse the repository at this point in the history
…y does not exists
  • Loading branch information
biuti authored Dec 24, 2020
1 parent 6173c79 commit a69c469
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions airscore/core/pilot/flightresult.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ def save_tracklog_map_file(self, task, flight=None, second_interval=5):
res_path = Path(MAPOBJDIR, 'tracks', str(task.id))
"""check if directory already exists"""
if not res_path.is_dir():
res_path.mkdir(mode=0o755)
res_path.mkdir(mode=0o755, parents=True)
"""creates a name for the file.
par_id.track"""
filename = f'{self.par_id}.track'
Expand All @@ -511,7 +511,7 @@ def save_tracklog_map_result_file(self, data, trackid, taskid):
res_path = Path(MAPOBJDIR, 'tracks', str(taskid))
"""check if directory already exists"""
if not res_path.is_dir():
makedirs(res_path)
res_path.mkdir(mode=0o755, parents=True)
"""creates a name for the track
name_surname_date_time_index.igc
if we use flight date then we need an index for multiple tracks"""
Expand Down

0 comments on commit a69c469

Please sign in to comment.