@@ -268,7 +268,7 @@ public static void LinkFolderToFolder(IProject project, IPath source, IPath targ
268
268
269
269
// create the actual link
270
270
try {
271
- createNewFolder (project , target .toString (), URIUtil . toURI ( source ) );
271
+ createNewFolder (project , target .toString (), source );
272
272
} catch (CoreException e ) {
273
273
Common .log (
274
274
new Status (IStatus .ERROR , Const .CORE_PLUGIN_ID , Messages .Helpers_Create_folder_failed + target , e ));
@@ -488,11 +488,14 @@ public static void addArduinoCodeToProject(IProject project, ICConfigurationDesc
488
488
* @return nothing
489
489
* @throws CoreException
490
490
*/
491
- public static void createNewFolder (IProject Project , String newFolderName , URI linklocation ) throws CoreException {
491
+ public static void createNewFolder (IProject Project , String newFolderName , IPath linklocation )
492
+ throws CoreException {
492
493
// IPath newFolderPath = Project.getFullPath().append(newFolderName);
493
494
final IFolder newFolderHandle = Project .getFolder (newFolderName );
494
495
if (linklocation != null ) {
495
- newFolderHandle .createLink (linklocation , IResource .REPLACE | IResource .ALLOW_MISSING_LOCAL , null );
496
+ URI relativeLinklocation = Project .getPathVariableManager ().convertToRelative (URIUtil .toURI (linklocation ),
497
+ false , null );
498
+ newFolderHandle .createLink (relativeLinklocation , IResource .REPLACE | IResource .ALLOW_MISSING_LOCAL , null );
496
499
} else {
497
500
newFolderHandle .create (0 , true , null );
498
501
}
0 commit comments