shithub: map

Download patch

ref: 5069a5bb5f5c4fdb01926ce7abaa56d733d44eb9
parent: 2376db3167bee07ce18758a32ef05916eb325a3f
author: sirjofri <sirjofri@sirjofri.de>
date: Fri Mar 28 07:48:35 EDT 2025

adds early checks

--- a/map.c
+++ b/map.c
@@ -27,6 +27,13 @@
 	va_end(args);
 }
 
+static void
+runchecks(void)
+{
+	if (access("/mnt/map/0", AEXIST) < 0)
+		sysfatal("/mnt/map does not exist: %r");
+}
+
 NWindow *mainwindow;
 NImage *nimage;
 
@@ -223,6 +230,8 @@
 	case 'd':
 		debug++;
 	}ARGEND;
+	
+	runchecks();
 	
 	if (debug)
 		traperrout();