jabref icon indicating copy to clipboard operation
jabref copied to clipboard

Allow cygwin-paths on Windows

Open koppor opened this issue 6 months ago • 2 comments

I start git bash on Windows.

I run

./gradlew :jabkit:run --args="check-consistency --input=/c/Users/koppor/Downloads/test.bib"

I get

ERROR: Error opening file '\c\Users\koppor\Downloads\test.bib': org.jabref.logic.importer.ImportException: java.nio.file.NoSuchFileException: \c\Users\koppor\Downloads\test.bib

I think, we need to internally map these paths to Windows paths (if file not found)

  • /c/ to C:\\
  • all / to \\

Then, the above command will run


File path changing code nees to go into org.jabref.logic.util.io.FileUtil

Method convertCygwinPathToWindows.

Should do conversion only if org.jabref.logic.os.OS.WINDOWS is true otherwise, return identifiy of parameter


Testing: A test case for Windows is needed.

Use

@EnabledOnOs(value = org.junit.jupiter.api.condition.OS.WINDOWS)

A separate test for non-windows, is needed, too

koppor avatar Jun 07 '25 21:06 koppor

/assign-me

kvitorr avatar Jun 09 '25 03:06 kvitorr

👋 Hey @kvitorr, thank you for your interest in this issue! 🎉

We're excited to have you on board. Start by exploring our Contributing guidelines, and don't forget to check out our workspace setup guidelines to get started smoothly.

For questions on JabRef functionality and the code base, you can consult the JabRef Guru or ask on our Gitter chat.

In case you encounter failing tests during development, please check our developer FAQs!

Having any questions or issues? Feel free to ask here on GitHub. Need help setting up your local workspace? Join the conversation on JabRef's Gitter chat. And don't hesitate to open a (draft) pull request early on to show the direction it is heading towards. This way, you will receive valuable feedback.

Happy coding! 🚀

github-actions[bot] avatar Jun 09 '25 03:06 github-actions[bot]

We think that this issue was fixed. Please head to https://builds.jabref.org/main to download a development build and try it out.

For any feedback, add a comment to the pull request at https://github.com/JabRef/jabref/pull/13297.

github-actions[bot] avatar Sep 03 '25 21:09 github-actions[bot]