Back to the main page.

Bug 1702 - ft_filetype has difficulties automatically detecting 4d-files

Status CLOSED FIXED
Reported 2012-09-07 11:55:00 +0200
Modified 2012-09-14 15:13:11 +0200
Product: FieldTrip
Component: fileio
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P3 normal
Assigned to: Jan-Mathijs Schoffelen
URL:
Tags:
Depends on:
Blocks:
See also:

Jan-Mathijs Schoffelen - 2012-09-07 11:55:29 +0200

when the datafiles have stupid names, such as '0'


Jan-Mathijs Schoffelen - 2012-09-07 11:57:04 +0200

bash-3.2$ svn diff ft_filetype.m Index: ft_filetype.m =================================================================== --- ft_filetype.m (revision 6436) +++ ft_filetype.m (working copy) @@ -356,7 +356,7 @@ type = '4d'; manufacturer = '4D/BTi'; content = ''; -elseif length(filename)<=4 && filetype_check_dir(p, 'config')%&& ~isempty(p) && exist(fullfile(p,'config'), 'file') %&& exist(fullfile(p,'hs_file'), 'file') +elseif length(f)<=4 && filetype_check_dir(p, 'config')%&& ~isempty(p) && exist(fullfile(p,'config'), 'file') %&& exist(fullfile(p,'hs_file'), 'file') % this could be a 4D file with non-standard/processed name % it will be detected as a 4D file when there is a config file in the % same directory as the specified file bash-3.2$ svn diff ft_filetype.m Index: ft_filetype.m =================================================================== --- ft_filetype.m (revision 6436) +++ ft_filetype.m (working copy) @@ -356,7 +356,7 @@ type = '4d'; manufacturer = '4D/BTi'; content = ''; -elseif length(filename)<=4 && filetype_check_dir(p, 'config')%&& ~isempty(p) && exist(fullfile(p,'config'), 'file') %&& exist(fullfile(p,'hs_file'), 'file') +elseif length(f)<=4 && filetype_check_dir(p, 'config')%&& ~isempty(p) && exist(fullfile(p,'config'), 'file') %&& exist(fullfile(p,'hs_file'), 'file') % this could be a 4D file with non-standard/processed name % it will be detected as a 4D file when there is a config file in the % same directory as the specified file bash-3.2$ svn commit ft_filetype.m Sending ft_filetype.m Transmitting file data . Committed revision 6440.