1.1 --- a/libfsserver/lib/files/host_file_opener.cc Thu Apr 22 00:12:16 2021 +0200
1.2 +++ b/libfsserver/lib/files/host_file_opener.cc Sat Apr 24 23:15:21 2021 +0200
1.3 @@ -35,21 +35,19 @@
1.4
1.5 stat(path, &statbuf);
1.6
1.7 - _paths.insert(FilePathEntry(statbuf.st_ino, path));
1.8 -
1.9 return statbuf.st_ino;
1.10 }
1.11
1.12 /* Return a new accessor for 'fileid'. */
1.13
1.14 -Accessor *HostFileOpener::make_accessor(fileid_t fileid)
1.15 +Accessor *HostFileOpener::make_accessor(const char *path, fileid_t fileid)
1.16 {
1.17 - FilePaths::iterator found = _paths.find(fileid);
1.18 + FILE *fp = fopen(path, "r");
1.19
1.20 - if (found != _paths.end())
1.21 - return new HostFileAccessor(found->second, fileid);
1.22 - else
1.23 + if (fp == NULL)
1.24 return NULL;
1.25 +
1.26 + return new HostFileAccessor(fp, fileid);
1.27 }
1.28
1.29 // vim: tabstop=4 expandtab shiftwidth=4