Skip to content
Snippets Groups Projects
Commit 86670bb4 authored by Lemmer, Jan's avatar Lemmer, Jan
Browse files

Merge branch 'fix/centralizedonlinux' into 'development'

Fix/centralizedonlinux

See merge request !69
parents 9b2f6c3c fb67ed5f
No related branches found
No related tags found
2 merge requests!73Docs/minimalexampleinreadme,!69Fix/centralizedonlinux
Pipeline #659751 passed
......@@ -46,6 +46,11 @@ if isstring(scriptPath)
scriptPath = char(scriptPath);
end
% ensure ParentFolder has no trailing fileseperator
if contains(options.ParentFolder(end),filesep)
options.ParentFolder(end)='';
end
%catch multiple figures in fig
if numel(figure) > 1
figure = figure(1);
......
......@@ -12,11 +12,17 @@ end
[~,filename,ext] = fileparts(SourceFile);
% create GroupName to avoid internal path issues on linux/unix systems
GroupName = split(SourceFile,filesep);
% Using windows fileseperator for the object name
GroupName = join(GroupName,'\');
GroupName = GroupName{:};
try
fid = H5F.create(fullfile(TargetPath,[filename,ext]));
%create External Link to Sourcefile in the Group linkToExternal
H5L.create_external(['..',filesep,SourceFile],'/',fid, SourceFile ,plist_id,plist_id);
%H5L.create_external(['..,filesep,'data',filesep,SourceFile],'/',fid, SourceFile ,plist_id,plist_id); %original
H5L.create_external(['..',SourceFile],'/',fid, GroupName ,plist_id,plist_id);
%H5L.create_external(['..,filesep,'data',SourceFile],'/',fid, GroupName ,plist_id,plist_id); %original
H5F.close(fid);
disp([fullfile(TargetPath,[filename,ext]),' created']);
status = 1;
......
......@@ -25,9 +25,9 @@ plot(x.^2,y,'-r');
PlotID.Publish(datapath,scriptPath, fig2, 'Method','centralized')
%% Note:
% If you rerun this script PlotId will tell you that a identical named (but
% not binary idetical) file exists in the data folder. This is intended,
% due protect the user from overwritting non (binary) identical files. The
% reason for this is that two hdf files with the same data are not idetical
% If you rerun this script PlotId will tell you that an identically named (but
% not binary identical) file exists in the data folder. This is intended
% to protect the user from overwritting non (binary) identical files. The
% reason for this is that two hdf files with the same data are not identical
% when recreated (see line 11). Usually you would use an existing file
% without changing it.
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment