Skip to content

Allow cygwin-paths on Windows #13274

@koppor

Description

@koppor

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

Metadata

Metadata

Assignees

Type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions