From e2d3a5d3c72206ffed7a8d252f2050fe0333c9bf Mon Sep 17 00:00:00 2001 From: pommicket Date: Fri, 21 Jul 2023 17:02:25 -0400 Subject: fix absolute font paths --- control | 2 +- ted.c | 5 +++++ ted.h | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/control b/control index c6a991c..d8fdafa 100644 --- a/control +++ b/control @@ -1,5 +1,5 @@ Package: ted -Version: 2.4.1 +Version: 2.4.2 Section: text Priority: optional Architecture: amd64 diff --git a/ted.c b/ted.c index 6a44d83..2322987 100644 --- a/ted.c +++ b/ted.c @@ -272,6 +272,11 @@ static bool ted_is_regular_buffer(Ted *ted, TextBuffer *buffer) { } Status ted_get_file(Ted const *ted, const char *name, char *out, size_t outsz) { + if (path_is_absolute(name)) { + str_cpy(out, outsz, name); + if (fs_file_exists(out)) + return true; + } if (ted->search_start_cwd) { // check in start_cwd path_full(ted->start_cwd, name, out, outsz); diff --git a/ted.h b/ted.h index e307aed..956ccef 100644 --- a/ted.h +++ b/ted.h @@ -28,7 +28,7 @@ extern "C" { #include "sdl-inc.h" /// Version number -#define TED_VERSION "2.4.1" +#define TED_VERSION "2.4.2" /// Version string #define TED_VERSION_FULL "ted v. " TED_VERSION /// Maximum path size ted handles. -- cgit v1.2.3