Re: RE: 0.2.4pre2

Vincent Danen <[email protected]> Mon, 29 Sep 2003 15:00:37 -0600
Newsgroups gmane.comp.bug-tracking.anthill.user
Message-ID <[email protected]>
--===============62075432481211079==
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="wjoFZxbW4tu+iR6v"
Content-Disposition: inline


--wjoFZxbW4tu+iR6v
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon Sep 29, 2003 at 12:15:47PM -0700, Scott Brown wrote:

> It didn't work. It behaves the same as though I had tried one "\", errors=
=20
> every time I try to load functions (almost every page). There has got to =
be=20
> a way to get it to properly interpret"\", but I'm not sure how. Maybe an=
=20
> ASCII representation comparison?

Can you try this patch?


--- functions.inc.php~	Fri Sep 26 16:45:39 2003
+++ functions.inc.php	Mon Sep 29 14:58:22 2003
@@ -662,7 +662,7 @@
     }
=20
     // create the diff
-    $stmpfile =3D ereg_replace($_CONF['shadowdir'] . "/","",$tmpfile);
+    $stmpfile =3D ereg_replace($_CONF['shadowdir'] . "/","",strtr(addcslas=
hes($tmpfile, "\0..\37!@\177..\377"), "\\", "/"));
     $antdiff  =3D tempnam($_CONF['tmpdir'],"ant-diff.");
     $cmd      =3D sprintf("%s -ruN %s/$bugnum %s/$stmpfile",$_CONF['diffto=
ol'],$_CONF['shadowdir'],$_CONF['shadowdir']);
     $output   =3D exec($cmd,$diffarray,$return);

Took me a bit to come up with that... it should make it work 100% under nix
and windows without any extra work.

Basically, we're turning \path\ to /path/, dropping the shadowdir and
trailing "/" and we should end up with just the filename, no path,
regardless of which OS you're using.

If that works, I'll commit to CVS.

Thanks.
=20
--=20
MandrakeSoft Security; http://www.mandrakesecure.net/
Online Security Resource Book; http://linsec.ca/
"lynx -source http://linsec.ca/vdanen.asc | gpg --import"
{FE6F2AFD : 88D8 0D23 8D4B 3407 5BD7  66F9 2043 D0E5 FE6F 2AFD}


--wjoFZxbW4tu+iR6v
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)

iD8DBQE/eJ11IEPQ5f5vKv0RAnzxAJ94IKbZUWAwERSLTqpQXqmyC1vPHgCeMuxf
ofPtg94ae5/QwHVmN0O+ox4=
=/wX9
-----END PGP SIGNATURE-----

--wjoFZxbW4tu+iR6v--


--===============62075432481211079==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Anthill-users mailing list
Anthill-users-+mQDA36h6dWw5LPnMra/[email protected]
http://vmlinuz.ca/mailman/listinfo/anthill-users

--===============62075432481211079==--