diff --git a/src/libstore/local-overlay-store.cc b/src/libstore/local-overlay-store.cc index dfd2f0d343e..04a1717cd66 100644 --- a/src/libstore/local-overlay-store.cc +++ b/src/libstore/local-overlay-store.cc @@ -247,6 +247,8 @@ Path LocalOverlayStore::toRealPathForHardLink(const StorePath & path) void LocalOverlayStore::remountIfNecessary() { + if (!_remountRequired) return; + if (remountHook.get().empty()) { warn("'%s' needs remounting, set remount-hook to do this automatically", realStoreDir.get()); } else {