Browse code

Skip permissions check on named pipes

Fixes #7680

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>

Alexandr Morozov authored on 2014/08/22 23:37:37
Showing 1 changed files
... ...
@@ -642,9 +642,10 @@ func ValidateContextDirectory(srcPath string, excludes []string) error {
642 642
 			return err
643 643
 		}
644 644
 		// skip checking if symlinks point to non-existing files, such symlinks can be useful
645
+		// also skip named pipes, because they hanging on open
645 646
 		lstat, _ := os.Lstat(filePath)
646
-		if lstat.Mode()&os.ModeSymlink == os.ModeSymlink {
647
-			return err
647
+		if lstat.Mode()&(os.ModeSymlink|os.ModeNamedPipe) != 0 {
648
+			return nil
648 649
 		}
649 650
 
650 651
 		if !f.IsDir() {