Skip to content

Commit 33f1aa6

Browse files
committed
[DATALAD] Recorded changes
1 parent c245bfa commit 33f1aa6

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

src/utils/isZipped.m

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
function status = isZipped(file)
2+
%
3+
% USAGE::
4+
%
5+
% status = isZipped(file)
6+
%
7+
% (C) Copyright 2022 CPP_SPM developers
8+
9+
status = strcmp(spm_file(file, 'ext'), 'gz');
10+
end

src/utils/removeDummies.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ function removeDummies(varargin)
7878

7979
volumeSplicing(inputFile, 1:numberOfVolumeToDiscard);
8080

81+
if isZipped(inputFile)
82+
inputFile = spm_file(inputFile, 'ext', '');
83+
end
8184
jsonFile = spm_file(inputFile, 'ext', 'json');
8285

8386
metadata.NumberOfVolumesDiscardedByUser = NumberOfVolumesDiscardedByUser;

src/utils/volumeSplicing.m

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
%
99
% :param inputFile:
1010
% :type inputFile: path
11+
%
1112
% :param volumesToRemove:
1213
% :type volumesToRemove: 1xn or nX1 array
14+
%
1315
% :param outputFile: optional parameter. default: will overwrite
1416
% ``inputFile``. If only a filename is given, the file will be created in the
1517
% same folder as the input file.
@@ -90,7 +92,3 @@
9092
end
9193

9294
end
93-
94-
function status = isZipped(file)
95-
status = strcmp(spm_file(file, 'ext'), 'gz');
96-
end

0 commit comments

Comments
 (0)