summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-04-10 11:36:52 -0400
committerJune McEnroe <june@causal.agency>2020-04-10 11:36:52 -0400
commit0bd5498a520c6d43434749ebcc87e80969f4f1ad (patch)
tree875d59b13e1d8f01a8008fc6303124f3dd6e8034
parentLink mbox files into message/ (diff)
downloadbubger-0bd5498a520c6d43434749ebcc87e80969f4f1ad.tar.gz
bubger-0bd5498a520c6d43434749ebcc87e80969f4f1ad.zip
Only write UIDNEXT when finished
Diffstat (limited to '')
-rw-r--r--archive.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/archive.c b/archive.c
index 350fdfa..b6960e3 100644
--- a/archive.c
+++ b/archive.c
@@ -103,6 +103,7 @@ int main(int argc, char *argv[]) {
 		if (!pass) errx(EX_CONFIG, ENV_PASSWORD " unset");
 	}
 
+	uint32_t uidNext = 0;
 	enum Atom login = 0;
 	enum Atom examine = atom("EXAMINE");
 	enum Atom thread = atom("THREAD");
@@ -154,8 +155,6 @@ int main(int argc, char *argv[]) {
 				if (next == prev) {
 					examine = 0;
 					fprintf(imap, "ayy LOGOUT\r\n");
-				} else {
-					uidWrite("UIDNEXT", next);
 				}
 			}
 		}
@@ -186,4 +185,5 @@ int main(int argc, char *argv[]) {
 		respFree(resp);
 	}
 	fclose(imap);
+	uidWrite("UIDNEXT", uidNext);
 }
vent suffixcmp()Lukas Fleischer Use suffixcmp() from Git instead of reimplementing it. This is a preparation for moving to ends_with() in Git 1.8.6. Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de> 2014-01-10Refactor cgit_parse_snapshots_mask()Lukas Fleischer Use Git string lists instead of str{spn,cspn,ncmp}() magic. This significantly improves readability. Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de> 2014-01-10Disallow use of undocumented snapshot delimitersLukas Fleischer Since the introduction of selective snapshot format configuration in dc3c9b5 (allow selective enabling of snapshots, 2007-07-21), we allowed seven different delimiters for snapshot formats, while the documentation has always been clear about spaces being the only valid delimiter: The value is a space-separated list of zero or more of the values "tar", "tar.gz", "tar.bz2", "tar.xz" and "zip". Supporting the undocumented delimiters makes the code unnecessarily complex. Remove them. Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de> 2014-01-10Replace most uses of strncmp() with prefixcmp()Lukas Fleischer This is a preparation for replacing all prefix checks with either strip_prefix() or starts_with() when Git 1.8.6 is released. Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de> 2014-01-09README: Fix dependenciesLukas Fleischer * Remove the dependency on Git (which can be obtained automatically when building, using either the Git submodule or `make get-git`). * Use proper upstream names of dependencies. Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de> 2014-01-08README: Spelling and formatting fixesLukas Fleischer * Several small spelling and capitalization fixes. * Use consistent and better-looking formatting that is compatible with AsciiDoc (and partly compatible with RST). Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de> 2014-01-08Fix UTF-8 with syntax-highlighting.pyPřemysl Janouch Previously the script tried to encode output from Pygments with the ASCII codec, which failed. Signed-off-by: Přemysl Janouch <p.janouch@gmail.com> 2014-01-08Add a suggestion to the manpagePřemysl Janouch So that people wishing to use "enable-http-clone" don't have to find out the correct settings on their own. Signed-off-by: Přemysl Janouch <p.janouch@gmail.com> 2014-01-08Fix the example configurationPřemysl Janouch "enable-git-clone" doesn't exist, replaced with "enable-http-clone". Signed-off-by: Přemysl Janouch <p.janouch@gmail.com> 2014-01-08Fix about-formatting.shPřemysl Janouch dash failed to parse the script. Signed-off-by: Přemysl Janouch <p.janouch@gmail.com> 2014-01-08Fix some spelling errorsPřemysl Janouch Signed-off-by: Přemysl Janouch <p.janouch@gmail.com> 2014-01-08filters: highlight.sh: add css comments for highlight 2.6 and 3.8Ferry Huberts