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 | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 4cecd7243665b6e98cc0b067c1b4f6a714a0e38250e4c9fb204539edd50cc000
User & Date: lexi on 2019-12-16 06:16:46
Other Links: manifest | tags
Context
2021-09-11
22:18
add rd-key check-in: 4e2b17fce2 user: lexi tags: trunk
2019-12-16
06:16
fix newtab to keep userscript sockets/fifos from tripping it up 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     92   		char* end = stpncpy(srv.sun_path, run, sizeof srv.sun_path);
    93     93   		end = stpncpy(end, ssz("/qutebrowser/"));
    94     94   		DIR* qb = opendir(srv.sun_path);
    95     95   		if (!qb) return start_instance;
    96     96   		struct dirent* ent;
    97     97   		while (ent = readdir(qb)) {
    98     98   			if (ent == NULL) return start_instance;
    99         -			if (ent -> d_name[0] != '.') break;
           99  +			if (strncmp(ent -> d_name, "ipc-", 4) == 0) break;
   100    100   		}
   101    101   		if (ent == NULL) return start_instance;
   102    102   		end = stpncpy(end, ent->d_name,
   103    103   				(sizeof srv.sun_path) - (end - srv.sun_path));
   104    104   		closedir(qb);
   105    105   	}
   106    106