Unverified Commit 62c3315f authored by Tommaso Tocci's avatar Tommaso Tocci
Browse files

bugfix: mk_node doesn't propagate errors from daemon

parent dfcfc7c2
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -88,7 +88,8 @@ int adafs_open(const std::string& path, mode_t mode, int flags) {

        // no access check required here. If one is using our FS they have the permissions.
        if(adafs_mk_node(path, mode | S_IFREG)) {
            CTX->log()->error("{}() error creating non-existent file", __func__);
            CTX->log()->error("{}() error creating non-existent file: {}",
                              __func__, strerror(errno));
            return -1;
        }
    } else {
+5 −1
Original line number Diff line number Diff line
@@ -63,7 +63,11 @@ int mk_node(const std::string& path, const mode_t mode) {
        errno = EBUSY;
        return -1;
    }
    int err = out.err;
    int err = 0;
    if (out.err) {
        err = -1;
        errno = out.err;
    }
    margo_free_output(handle, &out);
    margo_destroy(handle);
    return err;