mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-21 15:10:23 +00:00
Fix possible NPE
This commit is contained in:
parent
ebedd332bb
commit
3996d330a6
1 changed files with 4 additions and 0 deletions
|
@ -99,6 +99,10 @@ public final class BrowserFileListModel {
|
|||
}
|
||||
|
||||
public BrowserEntry rename(BrowserEntry old, String newName) {
|
||||
if (fileSystemModel == null || fileSystemModel.isClosed() || fileSystemModel.getCurrentPath().get() == null) {
|
||||
return old;
|
||||
}
|
||||
|
||||
var fullPath = FileNames.join(fileSystemModel.getCurrentPath().get(), old.getFileName());
|
||||
var newFullPath = FileNames.join(fileSystemModel.getCurrentPath().get(), newName);
|
||||
|
||||
|
|
Loading…
Reference in a new issue