RE: WebDAV Jigsaw: /tmp Required???

I'm working with Brett on this problem.  The code appears to hard-code this value in org.w3c.cvs.CvsRunner:

    private static final File tmpdir = new File("/tmp");
    public static boolean debug = true;

    /**
     * Dump the given string into a temporary file.
     * This is used for th <code>-f</code> argument of the cvs commit command.
     * This method should only be used from a synchronized method.
     * @param string The string to dump.
     */

    File getTemporaryFile (String string) 
	throws CvsException
    {
	// Create a pseudo-random temporary filename
	String fn = "cvs-" + System.currentTimeMillis()+"-"+string.length();
	File temp = new File (tmpdir, fn) ;
	try {
	    PrintStream out  = new PrintStream (new FileOutputStream(temp)) ;
	    out.print(string) ;
	    out.close() ;
	    return temp ;
	} catch (IOException ex) {
	    error ("temporaryFile"
		   , "unable to create/use temporary file: " 
		   + temp.getAbsolutePath()) ;
	}
	return temp ;
    }

I'm wondering what's the best way for us to change this?  I'm assuming we would write our own version of CvsRunner, but I'd like to change our CvsRunner to pick the tmp dir up from a props file somewhere.  Is there another example of doing something like this we could use?  Would this class have access to any properties set in, say, server.props?

Cheers
Craig
--
Craig L. Ching
Chief Product Architect
IBM Certified Specialist, MQSeries
IBM Certified Developer, MQSeries
MQSoftware, Inc.
(952) 345-8720
www.mqsoftware.com 
 

> -----Original Message-----
> From: Brett Wagner 
> Sent: Tuesday, June 03, 2003 3:51 PM
> To: www-jigsaw@w3.org
> Subject: WebDAV Jigsaw: /tmp Required???
> 
> 
> 
> Is there some way to set the "/tmp" directory which the CVS 
> uses in WebDAV Jigsaw?  Currently, if we do not create a 
> "/tmp" directory on the drive in which we installed WebDAV 
> Jigsaw putResources fail as follows:
> 
> D:\QNami\Jigsaw\Jigsaw\bin\cvs_wrapper.exe -directory 
> D:\QNami\Jigsaw\Jigsaw\WWW\MQSoftware\BTM\Profiles 
> D:\QNami\cvs.exe -q -d :local:D:\QNami\cvsroot status -l
> ... with a cvs status equals to : Up to date
> org.w3c.cvs.CvsRunner[temporaryFile]: unable to create/use 
> temporary file: d:\tmp\cvs-1054662640671-30
> 
> We have tried setting the environmental variables that CVS 
> usually uses; TMP and TMPDIR, but WebDAV Jigsaw's CVS does 
> not appear to be using these variables.
> 
> Thanks,
> Brett
> 
> 
> 

Received on Tuesday, 3 June 2003 17:20:47 UTC