summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-07-21 17:02:25 -0400
committerpommicket <pommicket@gmail.com>2023-07-21 17:02:25 -0400
commite2d3a5d3c72206ffed7a8d252f2050fe0333c9bf (patch)
tree8fbc6077aa15f0bcfe8e377a3a295c200568d944
parentb303a87db03522795ec8697415b61750d5f8c565 (diff)
fix absolute font paths
-rw-r--r--control2
-rw-r--r--ted.c5
-rw-r--r--ted.h2
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.