Skip to content

Commit

Permalink
Fix NPE when calling with bib file as cmd argument (#3343)
Browse files Browse the repository at this point in the history
Use toAbsolutePath before calling of getParent
  • Loading branch information
Siedlerchr committed Oct 24, 2017
1 parent 451b6f3 commit c928e20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/jabref/gui/util/FileUpdateMonitor.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private void notifyAboutChange(Path path) {
*/
public void addListenerForFile(Path file, FileUpdateListener listener) throws IOException {
// We can't watch files directly, so monitor their parent directory for updates
Path directory = file.getParent();
Path directory = file.toAbsolutePath().getParent();
directory.register(watcher, StandardWatchEventKinds.ENTRY_MODIFY);

listeners.put(file, listener);
Expand Down

0 comments on commit c928e20

Please sign in to comment.