From 769df9c36a6fda3a4f2e02ba8a24f0a77fa62946 Mon Sep 17 00:00:00 2001
From: Houtan Bastani <houtan@dynare.org>
Date: Wed, 19 Feb 2014 09:05:55 +0100
Subject: [PATCH] reporting: fix bug causing directory to be ignored if figname
 option was passed to addGraph

---
 matlab/reports/@graph/writeGraphFile.m | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/matlab/reports/@graph/writeGraphFile.m b/matlab/reports/@graph/writeGraphFile.m
index f3b175f8b2..6d8931d2bf 100644
--- a/matlab/reports/@graph/writeGraphFile.m
+++ b/matlab/reports/@graph/writeGraphFile.m
@@ -40,6 +40,8 @@ end
 
 if isempty(o.figname)
     o.figname = sprintf('%s/pg%d_sec%d_row%d_col%d.tex', o.figDirName, pg, sec, row, col);
+else
+    o.figname = [o.figDirName '/' o.figname];
 end
 
 [fid, msg] = fopen(o.figname, 'w');
-- 
GitLab