Correct file permission modification and the corresponding repair logic.

(0) -1 +1 +10 tip

mercurial