Remove basename
This commit is contained in:
@@ -54,6 +54,7 @@ function varargout = EASYconsole(varargin)
|
||||
fprintf('Using EASY script directory: %s from hardcoded default\n', easyDir);
|
||||
end
|
||||
|
||||
whos
|
||||
|
||||
% Set projectScansDir intelligently
|
||||
if ~isempty(getenv('PROJECT_SCANS_DIR'))
|
||||
@@ -107,7 +108,7 @@ function varargout = EASYconsole(varargin)
|
||||
end
|
||||
|
||||
% Get the name of the project
|
||||
projectName=basename(projectScansDir);
|
||||
[~, projectName]=fileparts(projectScansDir);
|
||||
|
||||
% Set the run-specific EASY output directory
|
||||
if ~isempty(getenv('EASY_RESULTS_DIR'))
|
||||
@@ -127,7 +128,7 @@ function varargout = EASYconsole(varargin)
|
||||
if ~isempty(getenv('EASY_PROJECT_NAME'))
|
||||
easyProjectName=getenv('EASY_PROJECT_NAME');
|
||||
else
|
||||
easyProjectName=basename(easyResultsDir);
|
||||
[~, easyProjectName]=fileparts(easyResultsDir);
|
||||
end
|
||||
|
||||
% User sanity check and warning
|
||||
@@ -284,7 +285,7 @@ function NewExpDat_Callback(~, ~, ~)
|
||||
[matfile,easyResultsDir]=uiputfile('.mat');
|
||||
inputFileName=strrep(inputFile,'.mat','');
|
||||
|
||||
projectName=basename(easyResultsDir);
|
||||
[~, projectName]=fileparts(easyResultsDir);
|
||||
% Set paths
|
||||
matDir=fullfile(easyResultsDir,'matResults');
|
||||
matFile=fullfile(matDir, projectName, '.mat');
|
||||
@@ -355,7 +356,7 @@ function LoadDatFile_Callback(~, ~, ~)
|
||||
[matDir,matFile]=uigetfile('.mat','Open Experiment folder and data storage .mat file name','MultiSelect','off');
|
||||
load(matFile);
|
||||
easyResultsDir=fullfile(matDir,'..');
|
||||
projectName=basename(easyResultsDir);
|
||||
[~, projectName]=fileparts(easyResultsDir);
|
||||
projectScansDir=fullfile(easyResultsDir, '..', '..', 'scans', projectName);
|
||||
|
||||
% TODO this is pretty hacky and needs something more explicit
|
||||
|
||||
Reference in New Issue
Block a user