util  Check-in [4cecd72436]

Overview
Comment:fix newtab to keep userscript sockets/fifos from tripping it up
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | trunk
Files: files | file ages | folders
SHA3-256: 4cecd7243665b6e98cc0b067c1b4f6a714a0e38250e4c9fb204539edd50cc000
User & Date: lexi on 2019-12-16 06:16:46
Other Links: manifest | tags
Context
2019-12-16
06:16
fix newtab to keep userscript sockets/fifos from tripping it up Leaf check-in: 4cecd72436 user: lexi tags: trunk
2019-11-05
16:41
update readme with reference to newer projects check-in: 05677edf7f user: lexi tags: trunk
Changes

Modified newtab.c from [2cfcd5a554] to [c8163da01b].

92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
		char* end = stpncpy(srv.sun_path, run, sizeof srv.sun_path);
		end = stpncpy(end, ssz("/qutebrowser/"));
		DIR* qb = opendir(srv.sun_path);
		if (!qb) return start_instance;
		struct dirent* ent;
		while (ent = readdir(qb)) {
			if (ent == NULL) return start_instance;
			if (ent -> d_name[0] != '.') break;
		}
		if (ent == NULL) return start_instance;
		end = stpncpy(end, ent->d_name,
				(sizeof srv.sun_path) - (end - srv.sun_path));
		closedir(qb);
	}








|







92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
		char* end = stpncpy(srv.sun_path, run, sizeof srv.sun_path);
		end = stpncpy(end, ssz("/qutebrowser/"));
		DIR* qb = opendir(srv.sun_path);
		if (!qb) return start_instance;
		struct dirent* ent;
		while (ent = readdir(qb)) {
			if (ent == NULL) return start_instance;
			if (strncmp(ent -> d_name, "ipc-", 4) == 0) break;
		}
		if (ent == NULL) return start_instance;
		end = stpncpy(end, ent->d_name,
				(sizeof srv.sun_path) - (end - srv.sun_path));
		closedir(qb);
	}