File: stop-unnecessary-recursive-chowning.patch

package info (click to toggle)
redmine 5.0.4-5~bpo11%2B2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye-backports
  • size: 21,036 kB
  • sloc: ruby: 111,908; javascript: 26,379; sh: 473; perl: 303; python: 179; makefile: 36
file content (25 lines) | stat: -rw-r--r-- 626 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Description: Stop unnecessary recursive chown'ing.
Author: Antonio Terceiro <terceiro@debian.org>
Author: Utkarsh Gupta <utkarsh@debian.org>
Bug-Debian: https://bugs.debian.org/1022816
Bug-Debian: https://bugs.debian.org/1022817
Origin: vendor
Forwarded: not-needed
Last-Update: 2023-02-10

--- a/bin/redmine-instances
+++ b/bin/redmine-instances
@@ -72,8 +72,12 @@
     dir="$target"
   fi
 
+  if [ -d "$dir" ]; then
+    return
+  fi
+
   mkdir -p "$dir"
-  chown -R "$REDMINE_INSTANCES_OWNERSHIP" "$dir"
+  chown "$REDMINE_INSTANCES_OWNERSHIP" "$dir"
 
   if [ "$dir" != $target ]; then
     mkdir -p $(dirname "$target")