mirror of
https://github.com/nestriness/cdc-file-transfer.git
synced 2026-05-01 17:03:07 +03:00
[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:
@@ -84,6 +84,9 @@ DiskDataStore::DiskDataStore(unsigned int depth, std::string cache_root_dir,
|
||||
absl::StatusOr<std::unique_ptr<DiskDataStore>> DiskDataStore::Create(
|
||||
unsigned int depth, std::string cache_root_dir, bool create_dirs,
|
||||
SystemClock* clock) {
|
||||
// Resolve e.g. ~.
|
||||
RETURN_IF_ERROR(path::ExpandPathVariables(&cache_root_dir),
|
||||
"Failed to expand cache dir '%s'", cache_root_dir);
|
||||
std::unique_ptr<DiskDataStore> store = absl::WrapUnique(
|
||||
new DiskDataStore(depth, std::move(cache_root_dir), create_dirs, clock));
|
||||
if (create_dirs) {
|
||||
|
||||
Reference in New Issue
Block a user