diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2012-10-09 21:50:16 +0900 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-10-09 21:50:16 +0900 |
commit | a2afe4128082b603add2b2be83f97ff78e0d0169 (patch) | |
tree | 7ffc495137a6c1179a67e107a671ce8e6f7abb9b /parse-xml.c | |
parent | ffd3b8591dcb4b22dc318b6a39bb4e2ac8140f42 (diff) | |
download | subsurface-a2afe4128082b603add2b2be83f97ff78e0d0169.tar.gz |
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>
Diffstat (limited to 'parse-xml.c')
-rw-r--r-- | parse-xml.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/parse-xml.c b/parse-xml.c index 44ef45746..698fe2a2f 100644 --- a/parse-xml.c +++ b/parse-xml.c @@ -1455,7 +1455,8 @@ static void reset_all(void) import_source = UNKNOWN; } -void parse_xml_buffer(const char *url, const char *buffer, int size, GError **error) +void parse_xml_buffer(const char *url, const char *buffer, int size, GError **error, + gboolean possible_default_filename) { xmlDoc *doc; @@ -1472,7 +1473,8 @@ void parse_xml_buffer(const char *url, const char *buffer, int size, GError **er return; } /* remember, if necessary, that this is the filename to store to */ - set_filename(url, FALSE); + if (possible_default_filename) + set_filename(url, FALSE); reset_all(); dive_start(); #ifdef XSLT |