diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-07-06 15:30:27 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-07-06 15:30:41 -0700 |
commit | 11e56456a042a6aec2e7e0b533acb195597af272 (patch) | |
tree | f87dcfaaeb7f87d5d46edae7aa77d0258c9ab16b /autoload.cpp | |
parent | d07e78c59a5e90f3a4cd5af2a1ec3d84eff94fe4 (diff) |
Fix for wrong sense for determining when an autoloaded function has changed
Addresses some of the complaints in https://github.com/fish-shell/fish-shell/pull/201
Diffstat (limited to 'autoload.cpp')
-rw-r--r-- | autoload.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/autoload.cpp b/autoload.cpp index 5e56f5e4..0bb621ba 100644 --- a/autoload.cpp +++ b/autoload.cpp @@ -197,12 +197,12 @@ bool autoload_t::locate_file_and_maybe_load_it( const wcstring &cmd, bool really if (! func) { /* Can't use a function that doesn't exist */ use_cached = false; - } else if ( ! allow_stale_functions && is_stale(func)) { - /* Can't use a stale function */ - use_cached = false; } else if (really_load && ! func->is_placeholder && ! func->is_loaded) { /* Can't use an unloaded function */ use_cached = false; + } else if ( ! allow_stale_functions && is_stale(func)) { + /* Can't use a stale function */ + use_cached = false; } else { /* I guess we can use it */ use_cached = true; @@ -266,7 +266,7 @@ bool autoload_t::locate_file_and_maybe_load_it( const wcstring &cmd, bool really autoload_function_t *func = this->get_node(cmd); /* Generate the source if we need to load it */ - bool need_to_load_function = really_load && (func == NULL || func->access.mod_time == access.mod_time || ! func->is_loaded); + bool need_to_load_function = really_load && (func == NULL || func->access.mod_time != access.mod_time || ! func->is_loaded); if (need_to_load_function) { /* Generate the script source */ |