Skip to content

Commit

Permalink
Use File.Exists instead of Path.Exists
Browse files Browse the repository at this point in the history
Since we don't want to succeed if someone has created a directory with
the name we're looking for, File.Exists is a better approach here.
  • Loading branch information
rmunn committed Dec 4, 2024
1 parent 71c3d3c commit 03c175b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/FwHeadless/Services/ProjectContextFromIdService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public async Task PopulateProjectContext(HttpContext context, Func<Task> next)
{
var projectFolder = Path.Join(config.Value.ProjectStorageRoot, $"{projectCode}-{projectId}");
var crdtFile = Path.Join(projectFolder, "crdt.sqlite");
if (Path.Exists(crdtFile))
if (File.Exists(crdtFile))
{
var project = new CrdtProject("crdt", crdtFile);
projectsService.SetProjectScope(project);
Expand Down

0 comments on commit 03c175b

Please sign in to comment.