Bug 145942 [regression] use library function does not work properly
steps to reproduce: - create a library - publish to resource folder - create a report - use the library - insert -> use library, or - outline -> libraries -> use library - navigate to designer resource folder - select a library - click on open expected behavior: - library is included actual behavior: - error occurred, please refer to attached screen capture
UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/views/actions/ImportLibraryAction.java
if ( MessageDialog.openConfirm( UIUtil.getDefaultShell( ),
						Messages.getString( "UseLibraryAction.Error.Title" ), 
						Messages.getFormattedString( "UseLibraryAction.Error.Message", 
								new String[]{
									targetFile.getName( )
								} ) ) )
					coypFile( orgFile, targetFile );
			}
			return targetFile.getAbsolutePath( );
		}
		return null;
	}
	private void coypFile( File org, File dest ) throws IOException
	{
		if ( dest.exists( ) || dest.createNewFile( ) )
		{
			FileInputStream in = new FileInputStream( org );
			FileOutputStream out = new FileOutputStream( dest );
			byte[] bytes = new byte[64];
			int length = 0;
			while ( ( length = in.read( bytes ) ) != -1 )
			{
				out.write( bytes, 0, length );
			}
			in.close( );
			out.close( );
		}
	}
}