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

Fix for issue 7641: Wrong path to TeXstudio #7664

Merged
merged 4 commits into from
Apr 26, 2021
Merged

Fix for issue 7641: Wrong path to TeXstudio #7664

merged 4 commits into from
Apr 26, 2021

Conversation

Gan-Cheng
Copy link
Contributor

@Gan-Cheng Gan-Cheng commented Apr 23, 2021

Fixes #7641

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked documentation: Is the information available and up to date? If not created an issue at https://github.com/JabRef/user-documentation/issues or, even better, submitted a pull request to the documentation repository.

Bug:

No matter where the extended applications are, the default path of them (taken texstudio as example) would be set as C:\Program Files (x86)\TeXstudio\texstudio.exe.

The way to fix:

I verify the existence of extended applications under related default path. If there is no texstudio.exe under C:\Program Files (x86)\TeXstudio\ and C:\Program Files\TeXstudio\, the function detectProgramPath() will return String value "", namely the default path will remain unset.

@Gan-Cheng Gan-Cheng changed the title Fix issue 7641 Fix for issue 7641: Wrong path to TeXstudio Apr 23, 2021
} else {
programPath = Path.of(progFiles, programName + DEFAULT_EXECUTABLE_EXTENSION).toString();
}
File program = new File(programPath);
Copy link
Member

Choose a reason for hiding this comment

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

You can use Files.exist(path)

}

progFiles = System.getenv("ProgramFiles");
System.out.println(progFiles);
Copy link
Member

Choose a reason for hiding this comment

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

Probably a left over from debugging. If you need debug output use LOGGER.debug(...)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

emmm,I was too careless. Thanks for your suggestion!

@Siedlerchr
Copy link
Member

Just some minor code changes, but otherwise lgtm!

@Siedlerchr Siedlerchr added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Apr 23, 2021
@Siedlerchr Siedlerchr merged commit b5c6b72 into JabRef:main Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong path to TeXstudio
2 participants