[2016-09-19 08:09] Dmitry Bogatov <kact...@gnu.org>
>
> part       text/plain                2174
> 
> [2016-09-17 11:45] Philipp Takacs <phil...@bureaucracy.de>
> >
> > part       text/plain                1172
> > [2016-09-16 15:22] Dmitry Bogatov <kact...@gnu.org>
> > >
> > > part       text/plain                1232
> > >
> > >  * avoid bogus Attach header, containing directory of
> > >    file being attached
> > Claim down explain the bug.
> 
> Sure. See this typescript (note two Attach headers):
> 
> 
>       Script started on Sun 18 Sep 2016 10:16:00 AM MSK
>       $ cat $(mhpath +drafts c)
>       To:
>       Cc:
>       Fcc: +sent
>       Subject:
>       X-GPG: 54B7F00D
>       Sign: yes
>       Enc: yes
>       --------
>       $ touch /tmp/foo
>       $ ./uip/whatnow2.sh  /tmp/foo
>       $ cat $(mhpath +drafts c)
>       To:
>       Cc:
>       Fcc: +sent
>       Subject:
>       X-GPG: 54B7F00D
>       Sign: yes
>       Enc: yes
>       Attach: /tmp/foo
>       Attach: /home/kaction/devel/alioth/mmh/mmh-git
>       --------
>       $ exit

Thanks I found the problem. I use ``cd -'' to go back to the working direktorie,
but this prints the direktory which is changed to. Can you conform the attached
patch fixs your bug.

Philipp
diff --git a/uip/whatnow2.sh b/uip/whatnow2.sh
index 543dbe5..22be353 100755
--- a/uip/whatnow2.sh
+++ b/uip/whatnow2.sh
@@ -75,7 +75,7 @@ get_realpath()
 	filename=`basename "$1"`
 	cd $reldir
 	echo "$PWD/$filename"
-	cd -
+	cd $OLDPWD
 }
 
 get_attachmentheader()

Reply via email to