From 7bc36cbbd14374afcdbd5d4a82257980788d5946 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Fri, 23 May 2014 12:53:11 +0200 Subject: [PATCH] Add bit 17, No Permission Bits --- protocol/PROTOCOL.md | 5 +++++ protocol/protocol.go | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/protocol/PROTOCOL.md b/protocol/PROTOCOL.md index 420d332d..d0cc412a 100644 --- a/protocol/PROTOCOL.md +++ b/protocol/PROTOCOL.md @@ -404,6 +404,11 @@ The Flags field is made up of the following single bit flags: synchronization. A peer MAY set this bit to indicate that it can temporarily not serve data for the file. + - Bit 17 ("P") is set when there is no permission information for the + file. This is the case when it originates on a non-permission- + supporting file system. Changes to only permission bits should be + disregarded on files with this bit set. + - Bit 0 through 17 are reserved for future use and SHALL be set to zero. diff --git a/protocol/protocol.go b/protocol/protocol.go index 767329c6..55bc4735 100644 --- a/protocol/protocol.go +++ b/protocol/protocol.go @@ -25,9 +25,10 @@ const ( ) const ( - FlagDeleted uint32 = 1 << 12 - FlagInvalid = 1 << 13 - FlagDirectory = 1 << 14 + FlagDeleted uint32 = 1 << 12 + FlagInvalid = 1 << 13 + FlagDirectory = 1 << 14 + FlagNoPermBits = 1 << 15 ) const (