shithub: npe

Download patch

ref: 3aef5b01a473555c92bba327ede73960daec22a8
parent: e8bd74f2530f77647921e586c7f89d31f661a7f5
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Mon Jul 10 13:52:35 EDT 2023

ditto, if fd2path failed

--- a/libnpe/realpath.c
+++ b/libnpe/realpath.c
@@ -13,7 +13,8 @@
 		if(fd2path(f, p, sizeof(p)) == 0)
 			s = buffer == nil ? strdup(p) : strcpy(buffer, p);
 		close(f);
-	}else if(strlen(path) < sizeof(p)){
+	}
+	if(s == nil && strlen(path) < sizeof(p)){
 		strcpy(buffer, path);
 		s = cleanname(buffer);
 	}