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
Branches
Tags
2 merge requests!73Docs/minimalexampleinreadme,!69Fix/centralizedonlinux
Pipeline #659751 passed
...@@ -46,6 +46,11 @@ if isstring(scriptPath) ...@@ -46,6 +46,11 @@ if isstring(scriptPath)
scriptPath = char(scriptPath); scriptPath = char(scriptPath);
end end
% ensure ParentFolder has no trailing fileseperator
if contains(options.ParentFolder(end),filesep)
options.ParentFolder(end)='';
end
%catch multiple figures in fig %catch multiple figures in fig
if numel(figure) > 1 if numel(figure) > 1
figure = figure(1); figure = figure(1);
......
...@@ -12,11 +12,17 @@ end ...@@ -12,11 +12,17 @@ end
[~,filename,ext] = fileparts(SourceFile); [~,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 try
fid = H5F.create(fullfile(TargetPath,[filename,ext])); fid = H5F.create(fullfile(TargetPath,[filename,ext]));
%create External Link to Sourcefile in the Group linkToExternal %create External Link to Sourcefile in the Group linkToExternal
H5L.create_external(['..',filesep,SourceFile],'/',fid, SourceFile ,plist_id,plist_id); H5L.create_external(['..',SourceFile],'/',fid, GroupName ,plist_id,plist_id);
%H5L.create_external(['..,filesep,'data',filesep,SourceFile],'/',fid, SourceFile ,plist_id,plist_id); %original %H5L.create_external(['..,filesep,'data',SourceFile],'/',fid, GroupName ,plist_id,plist_id); %original
H5F.close(fid); H5F.close(fid);
disp([fullfile(TargetPath,[filename,ext]),' created']); disp([fullfile(TargetPath,[filename,ext]),' created']);
status = 1; status = 1;
......
...@@ -25,9 +25,9 @@ plot(x.^2,y,'-r'); ...@@ -25,9 +25,9 @@ plot(x.^2,y,'-r');
PlotID.Publish(datapath,scriptPath, fig2, 'Method','centralized') PlotID.Publish(datapath,scriptPath, fig2, 'Method','centralized')
%% Note: %% Note:
% If you rerun this script PlotId will tell you that a identical named (but % If you rerun this script PlotId will tell you that an identically named (but
% not binary idetical) file exists in the data folder. This is intended, % not binary identical) file exists in the data folder. This is intended
% due protect the user from overwritting non (binary) identical files. The % 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 idetical % 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 % when recreated (see line 11). Usually you would use an existing file
% without changing it. % 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.
Please register or to comment