Skip to content

Fix usage with full-filename including path#12

Open
adhusch wants to merge 1 commit intojohnyf:mainfrom
adhusch:feature-support-full-filenames
Open

Fix usage with full-filename including path#12
adhusch wants to merge 1 commit intojohnyf:mainfrom
adhusch:feature-support-full-filenames

Conversation

@adhusch
Copy link
Copy Markdown

@adhusch adhusch commented Aug 4, 2017

Make a call like fig2pdf3d(gca, ‘/foo/bar/filename’) work too (crashed
before)

Make call like fig2pdf3d(gca, ‘/foo/bar/filename’) work too (crashed
before)
function [fname] = full_fname_with_extension(fname, extension)
fname = check_file_extension(fname, extension);
fname = fullfile(cd, fname);
if(isempty(fileparts(fname)))
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please give an example that explains why the isempty function results in handling full paths here? It seems that the function fileparts is the one documented at: https://www.mathworks.com/help/matlab/ref/fileparts.html .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants