A file that we import should never become the default file we save to

Only files that are opened should be considered r/w. Files that are
imported should be treated as if they were r/o.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2012-10-09 21:50:16 +09:00
parent ffd3b8591d
commit a2afe41280
5 changed files with 18 additions and 14 deletions

4
main.c
View file

@ -244,7 +244,7 @@ int main(int argc, char **argv)
}
no_filenames = FALSE;
GError *error = NULL;
parse_file(a, &error);
parse_file(a, &error, TRUE);
if (error != NULL)
{
@ -256,7 +256,7 @@ int main(int argc, char **argv)
if (no_filenames) {
GError *error = NULL;
const char *filename = subsurface_default_filename();
parse_file(filename, &error);
parse_file(filename, &error, TRUE);
/* don't report errors - this file may not exist, but make
sure we remember this as the filename in use */
set_filename(filename, FALSE);