Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong path to TeXstudio #7641

Closed
1 task done
dbitouze opened this issue Apr 18, 2021 · 6 comments · Fixed by #7664
Closed
1 task done

Wrong path to TeXstudio #7641

dbitouze opened this issue Apr 18, 2021 · 6 comments · Fixed by #7664
Labels
bug Confirmed bugs or reports that are very likely to be bugs good first issue An issue intended for project-newcomers. Varies in difficulty. os: windows

Comments

@dbitouze
Copy link

JabRef version 5.2 on Windows 10

  • Mandatory: I have tested the latest development version from http://builds.jabref.org/main and the problem persists: in fact not actually relevant since I could try it on Linux, but not on Windows (see below).

Students of mine, who are using Windows 10 (I'm a Linux user) experienced a problem when they tried to push citations to TeXstudio: it was impossible until we change the path to TeXstudio from C:\Program Files (x86)\texstudio to its, nowadays, default location C:\Program Files\texstudio.

@Siedlerchr
Copy link
Member

Thanks for the report. The code for the path detection lies here

@Override
public String detectProgramPath(String programName, String directoryName) {
String progFiles = System.getenv("ProgramFiles(x86)");
if (progFiles == null) {
progFiles = System.getenv("ProgramFiles");
}
if ((directoryName != null) && !directoryName.isEmpty()) {
return Path.of(progFiles, directoryName, programName + DEFAULT_EXECUTABLE_EXTENSION).toString();
}
return Path.of(progFiles, programName + DEFAULT_EXECUTABLE_EXTENSION).toString();
}

The problem is that it doesn't check for the existence of the file/executable inside the Programs x86/Program Files and therefore incorrectly assumes it's located in the x86 folder.

@Siedlerchr Siedlerchr added good first issue An issue intended for project-newcomers. Varies in difficulty. os: windows labels Apr 19, 2021
@Siedlerchr Siedlerchr added the bug Confirmed bugs or reports that are very likely to be bugs label Apr 19, 2021
@Gan-Cheng
Copy link
Contributor

Hi, I think this problem is interesting and not so difficult, could I try to fix it?

@Siedlerchr
Copy link
Member

@Gan-Cheng Sure, go ahead! Make sure to check out the contribution guide for getting started https://github.com/JabRef/jabref/blob/main/CONTRIBUTING.md

@Gan-Cheng
Copy link
Contributor

Thanks. By the way, I wonder whether it is required to implement the function of searching program path, or just judging existence of target path in program files and program files(x86) is Okay.

@Siedlerchr
Copy link
Member

Thanks to @Gan-Cheng this issue should now be resolved in the latest main version

We would like to ask you to use a development build from https://builds.jabref.org/main and report back if it works for you. Please remember to make a backup of your library before trying-out this version.

@dbitouze
Copy link
Author

Thanks to @Gan-Cheng this issue should now be resolved in the latest main version

Many thanks to both of you.

We would like to ask you to use a development build from https://builds.jabref.org/main and report back if it works for you.

Unfortunately, I cannot test because I don't own any Windows machine. But I'll report troubles if students of mine have again such a trouble.

@koppor koppor moved this to Done in Prioritization Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs good first issue An issue intended for project-newcomers. Varies in difficulty. os: windows
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants