Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,10 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- We fixed an issue where the `Move linked files to default file directory`- cleanup operation did not move the files to the location of the bib-file. [#2454](https://github.com/JabRef/jabref/issues/2454)
- We fixed an issue where executing `Move file` on a selected file in the `general`-tab could overwrite an existing file. [#2385](https://github.com/JabRef/jabref/issues/2358)
- We fixed an issue with importing groups and subgroups [#2600](https://github.com/JabRef/jabref/issues/2600)
- Fixed an issue where title-related key patterns did not correspond to the documentation [#2604](https://github.com/JabRef/jabref/issues/2604) [#2589](https://github.com/JabRef/jabref/issues/2589)
- We fixed an issue which prohibited the citation export to external programms on MacOS [#2613](https://github.com/JabRef/jabref/issues/2613)
- We fixed an issue where the file folder could not be changed when running `Get fulltext` in the `general`-tab [#2572](https://github.com/JabRef/jabref/issues/2572)
- Fixed an issue where title-related key patterns did not correspond to the documentation. [#2604](https://github.com/JabRef/jabref/issues/2604) [#2589](https://github.com/JabRef/jabref/issues/2589)
- We fixed an issue which prohibited the citation export to external programms on MacOS. [#2613](https://github.com/JabRef/jabref/issues/2613)
- We fixed an issue where the file folder could not be changed when running `Get fulltext` in the `general`-tab. [#2572](https://github.com/JabRef/jabref/issues/2572)
- Newly created libraries no longer have the executable bit set under POSIX/Linux systems. The file permissions are now set to `664 (-rw-rw-r--)`. [#2635](https://github.com/JabRef/jabref/issues/#2635)
### Removed


Expand Down
9 changes: 6 additions & 3 deletions src/main/java/org/jabref/logic/exporter/FileSaveSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public class FileSaveSession extends SaveSession {
private static final String TEMP_SUFFIX = "save.bib";
private final Path temporaryFile;


public FileSaveSession(Charset encoding, boolean backup) throws SaveException {
this(encoding, backup, createTemporaryFile());
}
Expand Down Expand Up @@ -86,8 +85,12 @@ public void commit(Path file) throws SaveException {
LOGGER.error("Error when creating lock file.", ex);
}

// Try to save file permissions to restore them later (by default: allow everything)
Set<PosixFilePermission> oldFilePermissions = EnumSet.allOf(PosixFilePermission.class);
// Try to save file permissions to restore them later (by default: 664)
Set<PosixFilePermission> oldFilePermissions = EnumSet.of(PosixFilePermission.OWNER_READ,
PosixFilePermission.OWNER_WRITE,
PosixFilePermission.GROUP_READ,
PosixFilePermission.GROUP_WRITE,
PosixFilePermission.OTHERS_READ);
if (FileUtil.isPosixCompilant && Files.exists(file)) {
try {
oldFilePermissions = Files.getPosixFilePermissions(file);
Expand Down