Commit bd20f794 authored by Marc Vef's avatar Marc Vef
Browse files

Merge branch 'fix_root_metadentry' into 'master'

Daemon: root directory must be relative

See merge request zdvresearch_bsc/adafs!69
parents 53dd8d27 28db5904
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ bool init_environment() {
    ADAFS_DATA->blocks_state(MDATA_USE_BLOCKS);
    // Create metadentry for root directory
    try {
        create_metadentry(ADAFS_DATA->mountdir(), S_IFDIR | 777);
        create_metadentry("/", S_IFDIR | 777);
    } catch (const std::exception& e ) {
        ADAFS_DATA->spdlogger()->error("{}() Unable to write root metadentry to KV store: {}", __func__, e.what());
        return false;
+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ bool is_absolute_path(const std::string& path) {
}

bool has_trailing_slash(const std::string& path) {
    return (path.back() == PSP);
    return (path.size() > 1) && (path.back() == PSP);
}

/* Make an absolute path relative to a root path