Repository navigation
Commit 2fe2843
committed
fix(slurm): escape glob metacharacters in the mount prune patterns
find treats -path's argument as a glob, so a mount point containing *, ?
or [ matched more than itself and pruned directories that were never
mounted. Those directories were then skipped, leaving behind exactly the
files the epilog is meant to remove.
Checked against real find with a mount point named a*b next to axb and
ayb: the unescaped pattern pruned all three and left 0 files, the escaped
one pruned only a*b and left 2. Backslashes are doubled first so the
escapes added afterwards are not doubled again.
printf -v drops the command substitution as well, so the value no longer
loses trailing newlines to $( ).
Both changes are dholt's review suggestions on #1408.1 parent 031fce1 commit 2fe2843
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
99 | 103 | | |
100 | 104 | | |
101 | 105 | | |
| |||
0 commit comments