aboutsummaryrefslogtreecommitdiffstats
path: root/pullimap
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2019-01-20 20:16:53 +0100
committerGuilhem Moulin <guilhem@fripost.org>2019-01-20 21:59:36 +0100
commit8c0f59f3f3add18a9ee8be767f54f43996ddbd78 (patch)
tree3f8d6706d12bc66db4a8187994969d15f3474b05 /pullimap
parent452ae91f06bec4c21e7ba7b7bc4309b089f7afe3 (diff)
Note on migrations.
Diffstat (limited to 'pullimap')
-rwxr-xr-xpullimap5
1 files changed, 5 insertions, 0 deletions
diff --git a/pullimap b/pullimap
index e044df5..bd9b1cf 100755
--- a/pullimap
+++ b/pullimap
@@ -88,6 +88,11 @@ do {
fcntl($STATE, F_SETLK, $struct_flock) or die "Can't lock $statefile: $!";
my $flags = fcntl($STATE, F_GETFD, 0) or die "fcntl F_GETFD: $!";
fcntl($STATE, F_SETFD, $flags | FD_CLOEXEC) or die "fcntl F_SETFD: $!";
+
+ # We have no version number in the statefile, but if we ever need a
+ # migration, we'll add a 1-byte header for the version number, and
+ # assume version 1.0 if the size of the file is a multiple of 4
+ # bytes. (We can also use the fact that bytes 5 to 8 are never all 0.)
};