diff --git a/jsoncache.m b/jsoncache.m index 0155c41..e6d95dc 100644 --- a/jsoncache.m +++ b/jsoncache.m @@ -50,7 +50,11 @@ % pathname = getenv('HOME'); -cachepath = {[pwd filesep '.neurojson'], [pathname filesep '.neurojson']}; +cachepath = {[pwd filesep '.neurojson']}; +if (strcmp(pathname, pwd) == 0) + cachepath{end + 1} = [pathname filesep '.neurojson']; +end + if (ispc) cachepath{end + 1} = [getenv('PROGRAMDATA') filesep 'neurojson']; elseif (ismac) @@ -61,8 +65,6 @@ cachepath{end + 1} = '/var/cache/neurojson'; end -cachepath = unique(cachepath, 'stable'); - if (nargin < 4) domain = 'io'; end