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

Merge branch 'jan.lemmer-master-patch-87059' into 'master'

Bugfix

See merge request !46
parents 76144180 f34c70ca
No related branches found
No related tags found
1 merge request!46Bugfix
Pipeline #601689 failed
function [status] = createLinkedHDF5(SourceFile,TargetPath,ID) function [status] = createLinkedHDF5(SourceFile,TargetPath)
%createLinkedHDF5 creates a HDF file that references the Sourcefile %createLinkedHDF5 creates a HDF file that references the Sourcefile
% TargetPath is the storage location, ID the foldername % TargetPath is the storage location, ID the foldername
% Status returns true if the function was successfull % Status returns true if the function was successfull
...@@ -12,21 +12,20 @@ end ...@@ -12,21 +12,20 @@ end
[~,filename,ext] = fileparts(SourceFile); [~,filename,ext] = fileparts(SourceFile);
% try try
%old %old
%fid = H5F.create(fullfile(TargetPath,ID,[ID,'_data.h5'])); %fid = H5F.create(fullfile(TargetPath,ID,[ID,'_data.h5']));
fid = H5F.create(fullfile(TargetPath,ID,[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(['..\',SourceFile],'/',fid, SourceFile ,plist_id,plist_id); H5L.create_external(['..',SourceFile],'/',fid, SourceFile ,plist_id,plist_id);
%H5L.create_external(['..\data\',SourceFile],'/',fid, SourceFile ,plist_id,plist_id); %original %H5L.create_external(['..',filesep,'data',filesep,SourceFile],'/',fid, SourceFile ,plist_id,plist_id); %original
H5F.close(fid); H5F.close(fid);
disp([fullfile(TargetPath,ID,[filename,ext]),' created']); disp([fullfile(TargetPath,[filename,ext]),' created']);
status = 1; status = 1;
% catch catch
% warning('No linked HDF file was created'); warning('No linked HDF file was created');
% status = 0; status = 0;
% end
end end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment