Skip to content

Commit

Permalink
Ensure datapath exists
Browse files Browse the repository at this point in the history
  • Loading branch information
stevencohn committed Dec 12, 2024
1 parent 98ef58b commit 3167098
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion OneMore/Commands/Tagging/HashtagScheduler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,13 @@ private sealed class Schedule

public HashtagScheduler()
{
filePath = Path.Combine(PathHelper.GetAppDataPath(), Resx.ScanningCueFile);
var dataPath = PathHelper.GetAppDataPath();

// very first time running OneMore or OneMoreTray, data folder may not yet exist
// so ensure it does exist otherwise saving the schedule may fail
PathHelper.EnsurePathExists(dataPath);

filePath = Path.Combine(dataPath, Resx.ScanningCueFile);

schedule = ReadSchedule();
if (schedule is null)
Expand Down

0 comments on commit 3167098

Please sign in to comment.