Browse Source

Add bit 17, No Permission Bits

Jakob Borg 11 years ago
parent
commit
7bc36cbbd1
2 changed files with 9 additions and 3 deletions
  1. 5 0
      protocol/PROTOCOL.md
  2. 4 3
      protocol/protocol.go

+ 5 - 0
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.
 

+ 4 - 3
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 (