Skip to main content
Homepage
Explore
Search or go to…
/
Sign in
Explore
Primary navigation
Project
plotID_matlab
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Collapse sidebar
Snippets
Groups
Projects
Show more breadcrumbs
plotID
plotID_matlab
Commits
d5d196c8
Commit
d5d196c8
authored
Aug 10, 2021
by
Lemmer, Jan
Browse files
Options
Downloads
Patches
Plain Diff
Closes
#17
Fixes Error for single File copying
parent
4edd7e41
No related branches found
No related tags found
3 merge requests
!13
PreRelease_V0.1
,
!12
PreRelease_V0.1
,
!1
Add Link-replacement feature
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
fcn_core/Publish.m
+1
-1
1 addition, 1 deletion
fcn_core/Publish.m
fcn_help/createFileCopy.m
+15
-10
15 additions, 10 deletions
fcn_help/createFileCopy.m
with
16 additions
and
11 deletions
fcn_core/Publish.m
+
1
−
1
View file @
d5d196c8
...
@@ -69,7 +69,7 @@ switch options.Method
...
@@ -69,7 +69,7 @@ switch options.Method
sourcePath
=
fList
.
name
{
idx
};
sourcePath
=
fList
.
name
{
idx
};
createLinkedHDF5
(
sourcePath
,
storPath
,
ID
);
createLinkedHDF5
(
sourcePath
,
storPath
,
ID
);
else
% no identical file exists
else
% no identical file exists
createFileCopy
(
DataPaths
.
rdata
,
'data'
,
storPath
,
ID
,
'dataCentral'
);
createFileCopy
(
DataPaths
.
rdata
{
i
}
,
'data'
,
storPath
,
ID
,
'dataCentral'
);
end
end
end
end
case
'individual'
case
'individual'
...
...
...
...
This diff is collapsed.
Click to expand it.
fcn_help/createFileCopy.m
+
15
−
10
View file @
d5d196c8
...
@@ -3,6 +3,11 @@ function [] = createFileCopy(filePaths,folderName,storPath,ID,type)
...
@@ -3,6 +3,11 @@ function [] = createFileCopy(filePaths,folderName,storPath,ID,type)
% folderName is the name of the exporting folder
% folderName is the name of the exporting folder
disp
([
'start to copy '
,
type
]);
disp
([
'start to copy '
,
type
]);
if
~
iscell
(
filePaths
)
%fixes Issue if Filepath is a char and not a cell array
filePaths
=
{
filePaths
};
end
% try
% try
for
i
=
1
:
numel
(
filePaths
)
for
i
=
1
:
numel
(
filePaths
)
FileNameAndLocation
=
filePaths
{
i
};
FileNameAndLocation
=
filePaths
{
i
};
...
@@ -28,15 +33,15 @@ function [] = createFileCopy(filePaths,folderName,storPath,ID,type)
...
@@ -28,15 +33,15 @@ function [] = createFileCopy(filePaths,folderName,storPath,ID,type)
% Write the file
% Write the file
RemotePath
=
fullfile
(
storPath
,
folderName
,
newfile
);
RemotePath
=
fullfile
(
storPath
,
folderName
,
newfile
);
%
Check if remote file already exists
(not working)
%
Check if remote file already exists
%
count = 0;
count
=
0
;
%
while isfile(RemotePath) && ismember(type,{'data','dataCentral'})
while
isfile
(
RemotePath
)
&&
ismember
(
type
,{
'data'
,
'dataCentral'
})
%
% Add a Sufix number to file name
% Add a Sufix number to
new
file name
%
count = count + 1;
count
=
count
+
1
;
%
[~,name,ext] = fileparts(RemotePath);
[
~
,
name
,
ext
]
=
fileparts
(
RemotePath
);
%
RemotePath = fullfile(storPath,folderName,...
RemotePath
=
fullfile
(
storPath
,
folderName
,
...
%
[name,'_',num2str(count),ext]);
[
name
,
'_'
,
num2str
(
count
),
ext
]);
%
end
end
copyfile
(
FileNameAndLocation
,
RemotePath
);
copyfile
(
FileNameAndLocation
,
RemotePath
);
end
end
disp
([
type
,
' sucessfully published'
]);
disp
([
type
,
' sucessfully published'
]);
...
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment