Skip to content

Commit

Permalink
Add comment explaining magic num value
Browse files Browse the repository at this point in the history
  • Loading branch information
mjkw31 committed Nov 29, 2024
1 parent e597080 commit 6f04af7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion walk/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ import (
)

const userOnlyPerm = 0700
const maxQuotedPathLength = 4096*4 + 2

// non-ascii bytes could become \xXX (4x the length at worst) and the two speech-marks are +2.
const maxQuotedPathLength = maxPathLength*4 + 2

// WriteError is an error received when trying to write strings to disk.
type WriteError struct {
Expand Down

0 comments on commit 6f04af7

Please sign in to comment.