tag 405493 patch thank Hello,
> Basically, we're using the Colon here, as a separator. If : is going > to be a valid character used in directories, What other character > would be reasonable? > > sed -e "/^--- \|^diff /s: \./: $(basename "$DPEP_SOURCEDIR")~/:" \ > -e "/^+++ \|^diff /s: $WORKDIR/: :" \ > -e "/^diff /s: $DPEP_DIFF_EXCLUDE::" > "$DIFFHOLDER" || true I completly agree with Junichi that there is no point in a directory name like that one. Anyway, I'd like to have this fixed. Googling a bit, it looks like ( http://en.wikipedia.org/wiki/Filename ) that only "/" and "null" are reserved for file/dir names, but some chars *should* not be used since interpreted by the shell, for example "!", "|", etc. I've created a simple patch replacing ":" with "|", I've tested with a normal directory name and one with a ":" in its name and it's working fine. Thanks, -- Sandro Tosi (aka morph, Morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/
diff --git a/dpep/dpatch-edit-patch b/dpep/dpatch-edit-patch index 6e80f57..b282caa 100755 --- a/dpep/dpatch-edit-patch +++ b/dpep/dpatch-edit-patch @@ -303,9 +303,9 @@ DIFFHOLDER="$(tempfile -d "$WORKDIR" -p "dpep." -s ".diff")" dpep_message debug1 "Diff temporary file is $DIFFHOLDER" cd "$REFDIR" LC_ALL=C diff -urNad $DPEP_DIFF_EXCLUDE . "$WORKDIR/$(basename "$DPEP_SOURCEDIR")" | - sed -e "/^--- \|^diff /s: \./: $(basename "$DPEP_SOURCEDIR")~/:" \ - -e "/^+++ \|^diff /s: $WORKDIR/: :" \ - -e "/^diff /s: $DPEP_DIFF_EXCLUDE::" > "$DIFFHOLDER" || true + sed -e "/^--- \|^diff /s| \./| $(basename "$DPEP_SOURCEDIR")~/|" \ + -e "/^+++ \|^diff /s| $WORKDIR/| |" \ + -e "/^diff /s| $DPEP_DIFF_EXCLUDE||" > "$DIFFHOLDER" || true # Diff created, let's switch back to the original directory, and start the # process of updating or creating the patch.