From 609e11f11d50191dc7ba82177a190e339306f8f0 Mon Sep 17 00:00:00 2001 From: myT <> Date: Fri, 29 Sep 2023 22:47:32 +0200 Subject: [PATCH] fixed drop errors when opening demos in subdirectories on Linux --- changelog.txt | 4 ++-- code/linux/linux_shared.cpp | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/changelog.txt b/changelog.txt index 38b10bd..a73f571 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,11 +2,11 @@ See the end of this file for known issues. -20 Sep 23 - 1.53 +29 Sep 23 - 1.53 add: /registerdemos adds Windows file associations for demo files (.dm_68 .dm_67 .dm_66) /unregisterdemos removes Windows file associations for demo files - in addition, /demo can now play demo files that have an absolute path (e.g. /demo C:\test.dm_68) + on Windows, /demo can now play demo files that have an absolute path (e.g. /demo C:\test.dm_68) add: r_teleporterFlash <0|1> (default: 1) draws bright colors when being teleported (use 0 for black) diff --git a/code/linux/linux_shared.cpp b/code/linux/linux_shared.cpp index ac43707..25eaf9c 100644 --- a/code/linux/linux_shared.cpp +++ b/code/linux/linux_shared.cpp @@ -761,5 +761,8 @@ qbool Sys_IsDebuggerAttached() qbool Sys_IsAbsolutePath( const char* path ) { - return path[0] == '/'; + // when the mod feeds us a relative demo file path with a leading slash, + // we then think it's an absolute file path and fail to open the file... + // bad: return path[0] == '/'; + return qfalse; }