browser, files: use full path in error message when in confined mode

The relative path could be . or .. or even empty, which is uninformative.

This fixes the last part of https://savannah.gnu.org/bugs/?47798.
This commit is contained in:
Benno Schulenberg
2016-05-16 21:18:09 +02:00
parent c0285682e4
commit fbb6208d15
2 changed files with 4 additions and 4 deletions

View File

@@ -428,7 +428,7 @@ bool open_buffer(const char *filename, bool undoable)
#ifndef DISABLE_OPERATINGDIR
if (check_operating_dir(filename, FALSE)) {
statusline(ALERT, _("Can't insert file from outside of %s"),
operating_dir);
full_operating_dir);
return FALSE;
}
#endif
@@ -1777,7 +1777,7 @@ bool write_file(const char *name, FILE *f_open, bool tmp, append_type
/* If we're writing a temporary file, we're probably going outside
* the operating directory, so skip the operating directory test. */
if (!tmp && check_operating_dir(realname, FALSE)) {
statusline(ALERT, _("Can't write outside of %s"), operating_dir);
statusline(ALERT, _("Can't write outside of %s"), full_operating_dir);
goto cleanup_and_exit;
}
#endif