commit 2bed69d
default
·
2023-06-15 02:29:26 +0000 UTC
parent 297b82c
Use the _a.json extension for actor object links into following/.
1 files changed,
+3,
-3
M
data.c
M
data.c
+3,
-3
1@@ -1174,7 +1174,7 @@ int following_add(snac *snac, const char *actor, const xs_dict *msg)
2 xs *actor_fn = _object_fn(actor);
3
4 /* increase its reference count */
5- fn = xs_replace_i(fn, ".json", "");
6+ fn = xs_replace_i(fn, ".json", "_a.json");
7 link(actor_fn, fn);
8 }
9 else
10@@ -1196,7 +1196,7 @@ int following_del(snac *snac, const char *actor)
11 unlink(fn);
12
13 /* also delete the reference to the author */
14- fn = xs_replace_i(fn, ".json", "");
15+ fn = xs_replace_i(fn, ".json", "_a.json");
16 unlink(fn);
17
18 return 200;
19@@ -1265,7 +1265,7 @@ xs_list *following_list(snac *snac)
20 list = xs_list_append(list, actor);
21
22 /* check if there is a link to the actor object */
23- xs *v2 = xs_replace(v, ".json", "");
24+ xs *v2 = xs_replace(v, ".json", "_a.json");
25
26 if (mtime(v2) == 0.0) {
27 /* no; add a link to it */