Skip to content

Commit

Permalink
Merge pull request adafruit#9314 from dhalbert/workflow-abs-path-fix-2
Browse files Browse the repository at this point in the history
Further fix to use absolute paths in remote workflows
  • Loading branch information
tannewt authored Jun 7, 2024
2 parents d9387bc + e4f6656 commit 5d9129a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion supervisor/shared/filesystem.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,13 @@ fs_user_mount_t *filesystem_for_path(const char *path_in, const char **path_unde
fs_mount = filesystem_circuitpy();
} else {
fs_mount = MP_OBJ_TO_PTR(vfs->obj);
*path_under_mount += strlen(vfs->str);
// Check if the vfs name is one character long: it must be "/" in that case.
// If so don't remove the mount point name. We must use an absolute path
// because otherwise the path will be adjusted by os.getcwd() when it's looked up.
if (strlen(vfs->str) != 1) {
// Remove the mount point directory name, such as "/sd".
path_under_mount += strlen(vfs->str);
}
}
return fs_mount;
}
Expand Down

0 comments on commit 5d9129a

Please sign in to comment.