mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-28 04:35:09 +00:00
Remove file_access_attempt_t::stale
It was unused.
This commit is contained in:
parent
76306c4582
commit
6dd2766a15
2 changed files with 1 additions and 4 deletions
|
@ -26,7 +26,6 @@
|
||||||
static const int kAutoloadStalenessInterval = 15;
|
static const int kAutoloadStalenessInterval = 15;
|
||||||
|
|
||||||
file_access_attempt_t access_file(const wcstring &path, int mode) {
|
file_access_attempt_t access_file(const wcstring &path, int mode) {
|
||||||
// std::fwprintf(stderr, L"Touch %ls\n", path.c_str());
|
|
||||||
file_access_attempt_t result = {};
|
file_access_attempt_t result = {};
|
||||||
struct stat statbuf;
|
struct stat statbuf;
|
||||||
if (wstat(path, &statbuf)) {
|
if (wstat(path, &statbuf)) {
|
||||||
|
@ -42,7 +41,6 @@ file_access_attempt_t access_file(const wcstring &path, int mode) {
|
||||||
|
|
||||||
// Note that we record the last checked time after the call, on the assumption that in a slow
|
// Note that we record the last checked time after the call, on the assumption that in a slow
|
||||||
// filesystem, the lag comes before the kernel check, not after.
|
// filesystem, the lag comes before the kernel check, not after.
|
||||||
result.stale = false;
|
|
||||||
result.last_checked = time(NULL);
|
result.last_checked = time(NULL);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "env.h"
|
#include "env.h"
|
||||||
#include "lru.h"
|
#include "lru.h"
|
||||||
|
#include "wutil.h"
|
||||||
|
|
||||||
/// Record of an attempt to access a file.
|
/// Record of an attempt to access a file.
|
||||||
struct file_access_attempt_t {
|
struct file_access_attempt_t {
|
||||||
|
@ -20,8 +21,6 @@ struct file_access_attempt_t {
|
||||||
time_t last_checked;
|
time_t last_checked;
|
||||||
/// Whether or not we believe we can access this file
|
/// Whether or not we believe we can access this file
|
||||||
bool accessible;
|
bool accessible;
|
||||||
/// The access attempt is stale
|
|
||||||
bool stale;
|
|
||||||
/// If we cannot access the file, the error code encountered.
|
/// If we cannot access the file, the error code encountered.
|
||||||
int error;
|
int error;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue