Use streamfile helpers

This commit is contained in:
bnnm 2018-08-04 20:42:25 +02:00
parent 0fc5b466c8
commit 10dc43f2fb

View File

@ -397,7 +397,7 @@ static STREAMFILE * open_txth(STREAMFILE * streamFile) {
/* try "(path/)(name.ext).txth" */
get_streamfile_name(streamFile,filename,PATH_LIMIT);
strcat(filename, ".txth");
streamText = streamFile->open(streamFile,filename,STREAMFILE_DEFAULT_BUFFER_SIZE);
streamText = open_streamfile(streamFile,filename);
if (streamText) return streamText;
/* try "(path/)(.ext).txth" */
@ -406,13 +406,13 @@ static STREAMFILE * open_txth(STREAMFILE * streamFile) {
strcat(filename,".");
strcat(filename, fileext);
strcat(filename, ".txth");
streamText = streamFile->open(streamFile,filename,STREAMFILE_DEFAULT_BUFFER_SIZE);
streamText = open_streamfile(streamFile,filename);
if (streamText) return streamText;
/* try "(path/).txth" */
get_streamfile_path(streamFile,filename,PATH_LIMIT);
strcat(filename, ".txth");
streamText = streamFile->open(streamFile,filename,STREAMFILE_DEFAULT_BUFFER_SIZE);
streamText = open_streamfile(streamFile,filename);
if (streamText) return streamText;
/* not found */