Browse Source

Fix minor edge case in diff-pr

Tianon Gravi 6 years ago
parent
commit
de3335b278
1 changed files with 2 additions and 1 deletions
  1. 2 1
      diff-pr.sh

+ 2 - 1
diff-pr.sh

@@ -195,7 +195,8 @@ copy-tar() {
 			[ "$f" = "$origF" ] && failureMatters=1 || failureMatters=
 
 			local globbed
-			globbed=( $(cd "$dDir" && find -path "./$f") )
+			# "find: warning: -path ./xxx/ will not match anything because it ends with /."
+			globbed=( $(cd "$dDir" && find -path "./${f%/}") )
 			if [ "${#globbed[@]}" -eq 0 ]; then
 				globbed=( "$f" )
 			fi