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

fixed some minor Issues

parent 5b845747
No related branches found
No related tags found
2 merge requests!13PreRelease_V0.1,!12PreRelease_V0.1
......@@ -97,9 +97,15 @@ switch options.Method
PlotID.createLinkedHDF5(sourcePath,storPath,ID);
end
else % no identical file exists
%Copy the file in data
PlotID.createFileCopy(DataPaths.rdata{i},'data',storPath,ID,'dataCentral');
end
end
%WIP
% if contains(DataPaths.rdata{i},{'.h5','.hdf5'}) % Linking only for HDF5
% % and create linked files in the plot folder
% PlotID.createLinkedHDF5(DataPaths.rdata{i},storPath,ID);
% end %if
end %if
end %for
case 'individual'
% Create a copy of the research data
PlotID.createFileCopy(DataPaths.rdata,folderName,storPath,ID, 'data');
......
......@@ -15,8 +15,10 @@ function [] = createFileCopy(filePaths,folderName,storPath,ID,type)
switch type
case 'data'
sufix = '_data';
newfile = sprintf([ID, sufix, '_' , num2str(i) ,ext]);
newfile = sprintf([name,ext]); %keep original name
%old behaviour
%sufix = '_data';
%newfile = sprintf([ID, sufix, '_' , num2str(i) ,ext]);
case 'dataCentral'
%keep original name
newfile = sprintf([name,ext]);
......
......@@ -10,11 +10,17 @@ if iscell(SourceFile)
SourceFile = SourceFile{1};
end
[~,filename,ext] = fileparts(SourceFile);
% try
fid = H5F.create(fullfile(TargetPath,ID,[ID,'_data.h5']));
%old
%fid = H5F.create(fullfile(TargetPath,ID,[ID,'_data.h5']));
fid = H5F.create(fullfile(TargetPath,ID,[filename,ext]));
%create External Link to Sourcefile in the Group linkToExternal
H5L.create_external(['..\data\',SourceFile],'/',fid, SourceFile ,plist_id,plist_id);
H5F.close(fid);
disp([fullfile(TargetPath,ID,[filename,ext]),' created']);
status = 1;
% catch
% warning('No linked HDF file was created');
......
......@@ -24,7 +24,14 @@ for i=1:height(fileList)
end
filepath = fullfile(fileList{i,'folder'},fileList{i,'name'});
%% old
%crucial performance due to matlab bug
%(see
%https://de.mathworks.com/matlabcentral/answers/338553-performance-of-system-dos-function)
if ispc
filename = ['"',filename,'"'];% Bugfix for spaces in path
[status,~] = system(['fc ' filename ' ' char(filepath)]);
% 0 -> identical, 1 -> not identical
status = ~status; % false (not identical), true(identical)
......@@ -34,9 +41,12 @@ for i=1:height(fileList)
else
warning('Platform not supported')
end
%%
if status == 1
id(i) = 1;
id =logical(id); %bugfix
return;
else
% Status can also be any other number e.g. 2
id(i) = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment