[cdc_fuse_fs] Fix various issues (#6)

Fixes a couple of issues with the FUSE:
- Creates the mount directory if it does not exist.
  This assumes the mount dir to be the last arg. Ideally, we'd parse the
  command line and then create the directory, but unfortunately
  fuse_parse_cmdline already verifies that the dir exists.
- Expands the cache_dir (e.g. ~).
- Fixes a compile issue in manifest_iterator.
This commit is contained in:
ljusten
2022-11-17 14:01:59 +01:00
committed by GitHub
parent 76bbdb01bb
commit ca84d3dd2e
6 changed files with 80 additions and 17 deletions
+7 -4
View File
@@ -99,12 +99,15 @@ enum class FolderId {
// Returns the Windows known folder path for the given |folder_id|.
absl::Status GetKnownFolderPath(FolderId folder_id, std::string* path);
// Expands environment path variables like %APPDATA%. Variables are matched
// case invariantly. Unknown environment variables are not changed.
absl::Status ExpandEnvironmentPathVariables(std::string* path);
#endif
// Expands environment path variables like %APPDATA% on Windows or ~ on Linux.
// On Windows, variables are matched case invariantly. Unknown environment
// variables are not changed.
// On Linux, performs a shell-like expansion. Returns an error if multiple
// results would be returned, e.g. from *.txt.
absl::Status ExpandPathVariables(std::string* path);
// Returns the environment variable with given |name| in |value|.
// Returns a NotFound error and sets |value| to an empty string if the variable
// does not exist.