Skip to content
Snippets Groups Projects
Commit fb67ed5f authored by M. Hock's avatar M. Hock
Browse files

adjusted ObjectName used to create the link to not be a unix path

parent 5e74174e
No related branches found
No related tags found
2 merge requests!73Docs/minimalexampleinreadme,!69Fix/centralizedonlinux
Pipeline #657759 passed
......@@ -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(['..',SourceFile],'/',fid, SourceFile ,plist_id,plist_id);
%H5L.create_external(['..,filesep,'data',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;
......
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