Closed GoogleCodeExporter closed 9 years ago
i changed my GOPATH env variable to B:\Program Files\programmation\go but the
issue is the same
Original comment by milak....@gmail.com
on 3 Apr 2012 at 8:49
It sounds like the bug is in the function located in
http://code.google.com/p/goclipse/source/browse/trunk/goclipse-n/src/com/googlec
ode/goclipse/builder/GoBuilder.java :
/**
*
* @param file
* @return
*/
public final String computePackagePath(File file) {
IProject project = getProject();
final IPath projectLocation = project.getLocation();
final IFile ifile = project.getFile(file.getAbsolutePath().replace(project.getLocation().toOSString(), ""));
IPath pkgFolder = Environment.INSTANCE.getPkgOutputFolder();
String pkgname = ifile.getParent().getLocation().toOSString();
pkgname = pkgname.replace(projectLocation.toOSString(), "");
String[] split = pkgname.split(File.separatorChar=='\\' ? "\\\\" : File.separator);
String path = projectLocation.toOSString()+"/"+pkgFolder;
for(int i = 2; i< split.length; i++){
path += "/"+split[i];
}
return path+GoConstants.GO_LIBRARY_FILE_EXTENSION;
}
At line : String[] split = pkgname.split(File.separatorChar=='\\' ? "\\\\" :
File.separator);
Original comment by milak....@gmail.com
on 3 Apr 2012 at 9:14
To reproduce the same exception i just haad to write this code :
"toto".split("\\");
Original comment by milak....@gmail.com
on 4 Apr 2012 at 8:11
Can you update and try again
Original comment by st...@kryas.com
on 6 Apr 2012 at 5:22
great it works ! you can close the ticket
Original comment by milak....@gmail.com
on 7 Apr 2012 at 7:04
Original comment by st...@kryas.com
on 7 Apr 2012 at 8:11
Original issue reported on code.google.com by
milak....@gmail.com
on 3 Apr 2012 at 7:42