Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 084bb040 authored by Jonathan Klee's avatar Jonathan Klee
Browse files

Merge branch '0000-s-misc-dev' into 'main'

Prevent some null pointer exception possibilities.

See merge request !236
parents e2d1350e 101bba60
Loading
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -93,6 +93,8 @@ public class LocalContentScanner extends AbstractContentScanner<File>{
    @Override
    @Override
    protected boolean isFileMatchingSyncedFileState(@NonNull File file, @NonNull SyncedFileState fileState) {
    protected boolean isFileMatchingSyncedFileState(@NonNull File file, @NonNull SyncedFileState fileState) {
        final String filePath = CommonUtils.getLocalPath(file);
        final String filePath = CommonUtils.getLocalPath(file);
        return fileState.getLocalPath().equals(filePath);
        final String localPath = fileState.getLocalPath();

        return localPath != null && localPath.equals(filePath);
    }
    }
}
}
 No newline at end of file
+3 −1
Original line number Original line Diff line number Diff line
@@ -99,7 +99,9 @@ public class RemoteContentScanner extends AbstractContentScanner<RemoteFile> {


    @Override
    @Override
    protected boolean isFileMatchingSyncedFileState(@NonNull RemoteFile file, @NonNull SyncedFileState fileState) {
    protected boolean isFileMatchingSyncedFileState(@NonNull RemoteFile file, @NonNull SyncedFileState fileState) {
        return fileState.getRemotePath().equals(file.getRemotePath());
        String remotePath = fileState.getRemotePath();

        return remotePath != null && remotePath.equals(file.getRemotePath());
    }
    }


    @Override
    @Override