From a418771c043fa62339a7ac367bdfb8be5e789daa Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Mon, 11 Aug 2014 07:52:03 +0200 Subject: [PATCH] Puller entrance warning --- model/puller.go | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/model/puller.go b/model/puller.go index b554c1a3..a92738b9 100644 --- a/model/puller.go +++ b/model/puller.go @@ -2,6 +2,25 @@ // All rights reserved. Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. +/* +__ __ _ _ +\ \ / /_ _ _ __ _ __ (_)_ __ __ _| | + \ \ /\ / / _` | '__| '_ \| | '_ \ / _` | | + \ V V / (_| | | | | | | | | | | (_| |_| + \_/\_/ \__,_|_| |_| |_|_|_| |_|\__, (_) + |___/ + +The code in this file is a piece of crap. Don't base anything on it. +Refactorin ongoing in new-puller branch. + +__ __ _ _ +\ \ / /_ _ _ __ _ __ (_)_ __ __ _| | + \ \ /\ / / _` | '__| '_ \| | '_ \ / _` | | + \ V V / (_| | | | | | | | | | | (_| |_| + \_/\_/ \__,_|_| |_| |_|_|_| |_|\__, (_) + |___/ +*/ + package model import ( @@ -441,8 +460,8 @@ func (p *puller) handleBlock(b bqBlock) bool { err = os.MkdirAll(dirName, 0777) } else { // We need to make sure the directory is writeable so we can create files in it - if (dirName != p.repoCfg.Directory) { - err = os.Chmod(dirName, 0777) + if dirName != p.repoCfg.Directory { + err = os.Chmod(dirName, 0777) } } if err != nil { @@ -606,8 +625,8 @@ func (p *puller) handleEmptyBlock(b bqBlock) { // Ensure the file and the directory it is in is writeable so we can remove the file dirName := filepath.Dir(of.filepath) os.Chmod(of.filepath, 0666) - if (dirName != p.repoCfg.Directory) { - os.Chmod(dirName, 0777) + if dirName != p.repoCfg.Directory { + os.Chmod(dirName, 0777) } if p.versioner != nil { if debug {