Skip to content

Fix for issue 7641: Wrong path to TeXstudio#7664

Merged
Siedlerchr merged 4 commits into
JabRef:mainfrom
Gan-Cheng:fix-issue-for-7641
Apr 26, 2021
Merged

Fix for issue 7641: Wrong path to TeXstudio#7664
Siedlerchr merged 4 commits into
JabRef:mainfrom
Gan-Cheng:fix-issue-for-7641

Conversation

@Gan-Cheng

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

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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