Verified Commit 62e79d81 authored by Tommaso Tocci's avatar Tommaso Tocci
Browse files

Metadata class: make constructor explicit

parent 2bf62a84
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ private:

public:
    Metadata();
    Metadata(mode_t mode);
    explicit Metadata(mode_t mode);
#ifdef HAS_SYMLINKS
    Metadata(mode_t mode, const std::string& target_path);
#endif
+1 −1
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ bool init_environment() {
    ADAFS_DATA->blocks_state(MDATA_USE_BLOCKS);
    try {
        // Create metadentry for root directory
        Metadata md = {S_IFDIR | 777};
        Metadata md(S_IFDIR | 777);
        create_metadentry("/", md);
    } catch (const std::exception& e ) {
        ADAFS_DATA->spdlogger()->error("{}() Unable to write root metadentry to KV store: {}", __func__, e.what());
+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ static hg_return_t rpc_srv_mk_node(hg_handle_t handle) {
    assert(ret == HG_SUCCESS);
    ADAFS_DATA->spdlogger()->debug("{}() Got RPC (from local {}) with path {}", __func__,
                                   (margo_get_info(handle)->context_id == ADAFS_DATA->host_id()), in.path);
    Metadata md = {in.mode};
    Metadata md(in.mode);
    try {
        // create metadentry
        create_metadentry(in.path, md);