Skip to content

Commit 184baf7

Browse files
author
Lawrence
committed
remove getWorkspace(). Changed to pwd()
1 parent 0aab9b2 commit 184baf7

File tree

5 files changed

+6
-15
lines changed

5 files changed

+6
-15
lines changed

+file/writeNamespace.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ function writeNamespace(namespaceName)
22
%check/load dependency namespaces
33
Namespace = schemes.loadNamespace(namespaceName);
44

5-
path = fullfile(misc.getWorkspace(), '+types', ['+' Namespace.name]);
5+
path = fullfile(pwd, '+types', ['+' Namespace.name]);
66
if exist(path, 'dir') == 7
77
rmdir(path, 's');
88
end

+misc/getNamespaceDir.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
% TODO
1313
%
1414

15-
localNamespace = fullfile(misc.getWorkspace(), 'namespaces');
15+
localNamespace = fullfile(pwd, 'namespaces');
1616
rootNamespace = fullfile(misc.getMatnwbDir(), 'namespaces');
1717
if 7 == exist(localNamespace, 'dir')
1818
namespaceDir = localNamespace;

+misc/getWorkspace.m

Lines changed: 0 additions & 7 deletions
This file was deleted.

+schemes/exportJson.m

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
% returns containers.map of namespace names.
44

55
% Get the actual location of the matnwb directory.
6-
namespaceDir = misc.getNamespaceDir();
7-
8-
% namespaceDir = fullfile(misc.getWorkspace(), 'namespaces');
9-
namespaceList = dir(namespaceDir);
6+
namespaceList = dir(misc.getNamespaceDir());
107
isFileMask = ~[namespaceList.isdir];
118
namespaceFiles = namespaceList(isFileMask);
129
namespaceNames = {namespaceFiles.name};

+spec/generate.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@
2222
end
2323

2424
NamespaceInfo.schema = schema;
25-
namespacePath = fullfile(misc.getWorkspace(), 'namespaces');
26-
if 7 ~= exist(namespacePath, 'dir')
25+
namespacePath = misc.getNamespaceDir();
26+
if isempty(namespacePath)
27+
namespacePath = fullfile(pwd, 'namespaces');
2728
mkdir(namespacePath);
2829
end
2930
cachePath = fullfile(namespacePath, [NamespaceInfo.name '.mat']);

0 commit comments

Comments
 (0)