This commit is contained in:
a-sansara 2018-08-24 18:50:32 +02:00
parent 91aab4ab5c
commit 8dc1e7e436
3 changed files with 10 additions and 6 deletions

View File

@ -76,8 +76,8 @@ public class Pluie.Yaml.Dumper
/** /**
* get a gracefull yaml presentation of current Yaml.Node * get a gracefull yaml presentation of current Yaml.Node
* @param node the node to dump * @param node the node to dump
* @param flag indicating if enable printing colors
* @param show_line flag indicating if line number must be print * @param show_line flag indicating if line number must be print
* @param show_color flag indicating if enable printing colors
* @param show_tags flag indicating if tags must be print * @param show_tags flag indicating if tags must be print
* @param show_doc flag indicating if the document start must be print * @param show_doc flag indicating if the document start must be print
* @param indent number of space for indentation * @param indent number of space for indentation

View File

@ -83,7 +83,6 @@ public class Pluie.Yaml.Node : Yaml.AbstractChild, Pluie.Yaml.Collection
/** /**
* actions to execute before adding the specified child bode * actions to execute before adding the specified child bode
* @param child the Yaml.Node child to add * @param child the Yaml.Node child to add
* @throws Yaml.AddNodeError
*/ */
protected virtual void before_add (Yaml.Node child) throws Yaml.AddNodeError protected virtual void before_add (Yaml.Node child) throws Yaml.AddNodeError
{ {

View File

@ -152,10 +152,15 @@ namespace Pluie
var writter = new Io.Writter (path); var writter = new Io.Writter (path);
if (writter.write (zdata)) { if (writter.write (zdata)) {
var file = File.new_for_path (dpath); var file = File.new_for_path (dpath);
convert (writter.file, file, new ZlibDecompressor (ZFORMAT)); try {
var config = new Yaml.Config (dpath); convert (writter.file, file, new ZlibDecompressor (ZFORMAT));
obj = config.root_node (); var config = new Yaml.Config (dpath);
writter.delete_file (); obj = config.root_node ();
writter.delete_file ();
}
catch(GLib.Error e) {
of.error (e.message);
}
} }
} }
return obj; return obj;