Explorar o código

Fix minor edge case in diff-pr

Tianon Gravi %!s(int64=6) %!d(string=hai) anos
pai
achega
de3335b278
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  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