File: touch_error_handling

package info (click to toggle)
sash 3.8-5
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, buster
  • size: 484 kB
  • sloc: ansic: 9,822; makefile: 177; sh: 29
file content (20 lines) | stat: -rw-r--r-- 560 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Subject: Correct error message when touching non-existent file in non-writeable directory
From: Tollef Fog Heen <tfheen@debian.org>, Raul Miller <moth@debian.org>
Bug-Debian: #43428
Last-updated: 2010-04-04
Index: git/cmds.c
===================================================================
--- git.orig/cmds.c	2014-04-20 08:44:47.785146575 +0200
+++ git/cmds.c	2014-04-20 08:44:47.785146575 +0200
@@ -456,6 +456,11 @@
 			continue;
 		}
 
+		if (errno != EEXIST) {
+			perror(name);
+			continue;
+		}
+
 		if (utime(name, &now) < 0)
 		{
 			perror(name);