mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-19 21:21:15 -03:00
Do not lock the history file on remote filesystems
This avoids using locks for the history file if the file appears to be on a remote file system, like NFS. This is to avoid hangs if the filesystem does not support locking. If locking is not enabled, then in rare cases, history items may be dropped if multiple sessions try to write to the history file at once. This is thought to be better than hanging. Hopefully the recent change to require a trailing newline will avoid propagating partial items.
This commit is contained in:
@@ -417,6 +417,8 @@ bool path_get_data(wcstring &path) {
|
||||
return dir.success();
|
||||
}
|
||||
|
||||
int path_get_data_is_remote() { return get_data_directory().is_remote; }
|
||||
|
||||
void path_make_canonical(wcstring &path) {
|
||||
// Ignore trailing slashes, unless it's the first character.
|
||||
size_t len = path.size();
|
||||
|
||||
Reference in New Issue
Block a user