From: Gergo Borus <41896618+gergo-b@users.noreply.github.com> Date: Tue, 20 Nov 2018 20:56:32 +0000 (+0100) Subject: Report the proper path X-Git-Tag: v0.8.1~2^2~2 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=e7c3e21c8aa94bd680cb3f2af56128bbbe3cd684;p=thirdparty%2Fsnapper.git Report the proper path --- diff --git a/snapper/FileUtils.cc b/snapper/FileUtils.cc index e607c151..364dd590 100644 --- a/snapper/FileUtils.cc +++ b/snapper/FileUtils.cc @@ -84,8 +84,11 @@ namespace snapper dirfd = ::openat(dir.dirfd, name.c_str(), O_RDONLY | O_NOFOLLOW | O_NOATIME | O_CLOEXEC); if (dirfd < 0) - SN_THROW(IOErrorException(sformat("open failed path:%s errno:%d (%s)", dir.fullname().c_str(), + { + string failed_path = dir.fullname() + "/" + name; + SN_THROW(IOErrorException(sformat("open failed path:%s errno:%d (%s)", failed_path.c_str(), errno, stringerror(errno).c_str()))); + } struct stat buf; if (fstat(dirfd, &buf) != 0)