Skip to content

fix .bridge file loading by encoding brackets using toURI().toString() - #260

Open
traybug23 wants to merge 2 commits into
bridgedb:mainfrom
traybug23:fix-bridge-file-brackets
Open

fix .bridge file loading by encoding brackets using toURI().toString()#260
traybug23 wants to merge 2 commits into
bridgedb:mainfrom
traybug23:fix-bridge-file-brackets

Conversation

@traybug23

@traybug23 traybug23 commented Mar 23, 2026

Copy link
Copy Markdown

BridgeDb loading issues #211

The issue was that when a .bridge file was being downloaded twice, Windows would automatically add (1) to the file name and the plugin was unable to load it.

Solution: .toURI().toString(); encodes the parantheses from special character to %28 and %29. This would also encode (space) in the file name as %20, thus in case a file would have space in its name, it will still be loaded.

( is encoded as %28
) is encoded as %29
(space) is encoded as %20

Now, the BridgeDb files can load successfully.
@egonw @DeniseSl22

Screenshot 2026-03-23 210120

@egonw egonw self-assigned this Mar 24, 2026
@egonw
egonw self-requested a review March 24, 2026 08:20
Comment thread org.bridgedb.gui/src/org/bridgedb/gui/PgdbParameterModel.java
@egonw egonw assigned traybug23 and unassigned egonw Mar 25, 2026

@traybug23 traybug23 left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@egonw I added the missing + in the return string.

@egonw
egonw self-requested a review June 24, 2026 12:13
@egonw egonw assigned egonw and unassigned traybug23 Jun 24, 2026
@egonw

egonw commented Aug 2, 2026

Copy link
Copy Markdown
Member

Now, the BridgeDb files can load successfully. @egonw @DeniseSl22

@traybug23, I am sorry that it took so long. But I cannot put this in the first next release yet, as I do not have enough time right now to create a new PathVisio version.

How did you test this? Did you recompile PathVisio with the new jars?

When I use the below test code, I see that the two approaches are not equivalent, and I am afraid that the addition of file: will mess up the SQL connection link:

file = new File("pom (1).xml")
println file

println file.getAbsolutePath()
println file.toURI().toString()

@egonw egonw left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See other reply just a few seconds ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants