From ce5df8f12e08605f82ce2fa6e22ce972a9dd7d71 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Wed, 20 Nov 2024 10:31:19 +0100 Subject: [PATCH] Add comment to describe WriteMode mask starting point --- libs/filer/filer.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/filer/filer.go b/libs/filer/filer.go index 4d6facbe5..b5be4c3c2 100644 --- a/libs/filer/filer.go +++ b/libs/filer/filer.go @@ -18,6 +18,8 @@ type WriteMode int const writeModePerm = WriteMode(fs.ModePerm) const ( + // Note: these constants are defined as powers of 2 to support combining them using a bit-wise OR. + // They starts from the 10th bit (permission mask + 1) to avoid conflicts with the permission bits. OverwriteIfExists WriteMode = (writeModePerm + 1) << iota CreateParentDirectories )