read_file: replace $versions->{$filename} with $cver
authorDietmar Maurer <dietmar@proxmox.com>
Mon, 22 Jan 2018 11:12:40 +0000 (12:12 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 22 Jan 2018 13:52:04 +0000 (14:52 +0100)
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
src/PVE/INotify.pm

index a383040..1e5687b 100644 (file)
@@ -240,11 +240,11 @@ sub read_file {
 
     # file unchanged?
     if (!$ccinfo->{nocache} &&
-       $inotify && $versions->{$filename} &&
+       $inotify && $cver &&
        defined ($ccinfo->{data}) &&
        defined ($ccinfo->{version}) &&
        ($ccinfo->{readonce} ||
-        ($ccinfo->{version} == $versions->{$filename}))) {
+        ($ccinfo->{version} == $cver))) {
 
        my $ret;
        if (!$noclone && ref ($ccinfo->{data})) {