Skip to content

Commit 116af65

Browse files
committed
Fix storage location_path
1 parent e58c73e commit 116af65

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ build/
33
.vscode
44
.bash_profile
55
test/data_store/
6+
data_store/
67
.fair

src/objects/config.cxx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ void FDP::Config::initialise(RESTAPI api_location) {
216216
config_storage_location_value_["path"] = config_file_path_.string();
217217
}
218218
config_storage_location_value_["path"] = remove_backslash_from_path(config_storage_location_value_["path"].asString());
219+
config_storage_location_value_["path"] = API::remove_leading_forward_slash(config_storage_location_value_["path"].asString());
219220
config_storage_location_value_["public"] = true;
220221
config_storage_location_value_["hash"] = calculate_hash_from_file(config_file_path_);
221222
config_storage_location_value_["storage_root"] = config_storage_root_->get_uri();
@@ -253,6 +254,7 @@ void FDP::Config::initialise(RESTAPI api_location) {
253254
script_storage_location_value_["path"] = script_file_path_.string();
254255
}
255256
script_storage_location_value_["path"] = remove_backslash_from_path(script_storage_location_value_["path"].asString());
257+
script_storage_location_value_["path"] = API::remove_leading_forward_slash(script_storage_location_value_["path"].asString());
256258
script_storage_location_value_["hash"] = calculate_hash_from_file(script_file_path_);
257259
script_storage_location_value_["public"] = true;
258260
script_storage_location_value_["storage_root"] = config_storage_root_->get_uri();
@@ -567,6 +569,7 @@ void FDP::Config::finalise(){
567569

568570
storageData["path"] = str_path.string();
569571
storageData["path"] = remove_backslash_from_path(storageData["path"].asString());
572+
storageData["path"] = API::remove_leading_forward_slash(storageData["path"].asString());
570573
storageData["storage_root"] = config_storage_root_->get_uri();
571574

572575
storageLocationObj = ApiObject(api_->post("storage_location", storageData, token_));

0 commit comments

Comments
 (0)