Skip to content

Commit

Permalink
Merge pull request #26 from brettbatie/master
Browse files Browse the repository at this point in the history
Fixed Null Pointer Exception when downloading a drive doc/sheet that …
  • Loading branch information
siom79 committed Sep 25, 2023
2 parents ed4fd0f + dc77681 commit 0da301a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/jdrivesync/sync/Synchronization.java
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ private void createLocalDir(File newDirectory, SyncItem syncItem, com.google.api
private void performChecksumCheck(File file, SyncItem syncItem, com.google.api.services.drive.model.File remoteFile, boolean updateMetadata) {
String remoteFileMd5Checksum = remoteFile.getMd5Checksum();
String localFileMd5Checksum = computeMd5Checksum(file);
if (remoteFileMd5Checksum.equals(localFileMd5Checksum)) {
if (remoteFileMd5Checksum != null && remoteFileMd5Checksum.equals(localFileMd5Checksum)) {
syncItem.setLocalFile(Optional.of(file));
if (!updateMetadata) {
LOGGER.log(Level.FINE, "Not downloading file '" + syncItem.getPath() + "' because MD5 checksums are equal (local: " + localFileMd5Checksum + ", remote: " + remoteFileMd5Checksum + ").");
Expand Down

0 comments on commit 0da301a

Please sign in to comment.