From: <pm...@ny...> - 2008-08-02 03:41:15
|
But if you fork a process with a process builder, it can run in a separate directory, and if that process is say git-status, then the paths it returns will not be correct if addressed relative to the parent process. And from gitclipse, relative paths are always relative to the 'project root', yet I don't believe it is guaranteed that the 'user.dir' will be the same, as it will be the 'workspace'. (I will test this out over the weekend) -PB ------Original Message------ From: James Linder Sender: To: javagit-devel Cc: git...@li... Sent: Aug 1, 2008 11:25 PM Subject: [Gitclipse-devel] Changing Working Directory in Java Hi All, I found some insightful threads about how java handles changing the working directory of a Java program. They are: http://forums.sun.com/thread.jspa?threadID=665110&messageID=3894504 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4045688 In short, there is no way to change the working directory of a running Java program. So, this means that there is almost no reason for JavaGit to be using File.getAbsolutePath() in any of its code because the "user.dir" system almost never be the correct location to resolve a relative reference against. Thus, File.getPath() is sufficient for all places where we get the path from a File instance. Cheers, James ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Gitclipse-devel mailing list Git...@li... https://lists.sourceforge.net/lists/listinfo/gitclipse-devel Sent via BlackBerry |