Mercurial > hg > plml
view matlab/db/dbtmp.m @ 14:e1f87438e34c
Work around for lock-up when used by triserver project. By god it's ugly but it seems to work.
author | samer |
---|---|
date | Thu, 02 Feb 2012 03:01:20 +0000 |
parents | 0dd31a8c66bd |
children |
line wrap: on
line source
function locator=dbtmp(x) % dbtmp - Save object to matbase under tmp subtree % % dbtmp :: A -> action locator(A). dt=clock; root=dbroot; dir='tmp'; if ~exist(fullfile(root,dir),'dir') [rc,msg]=mkdir(root,dir); % if rc==0, error(msg); end end fn=uniquefile(dt,root,dir,'m%s'); % make up a filename save(fullfile(root,[fn '.mat']),'fn','x'); locator=[fn '|x'];