Skip to content

Commit

Permalink
Merge pull request #74 from Theoderich/bugfix-73
Browse files Browse the repository at this point in the history
bugfix #73: Backup go.mod file was always written back to src folder inste…
  • Loading branch information
raydac committed Sep 9, 2020
2 parents a1dd6d8 + e0b8e03 commit 1619fd0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ private void restoreGoModFromBackupAndRemoveBackup(@Nonnull final File folder) t
this.getLog().debug(String.format("Restoring go.mod from backup in %s, detected %d files", folder, backupFiles.size()));

for (final File backup : backupFiles) {
final File restored = new File(folder, GO_MOD_FILE_NAME);
final File restored = new File(backup.getParentFile(), GO_MOD_FILE_NAME);
if (restored.isFile() && !restored.delete()) {
throw new IOException("Can't delete file during backup restore: " + restored);
}
Expand Down

0 comments on commit 1619fd0

Please sign in to comment.