Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: lightningdevkit/rust-lightning
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9a1a978ee8e5b189d7055341944878a6ef633fbb
Choose a base ref
..
head repository: lightningdevkit/rust-lightning
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a857771d658430a0bf42afbfa6fcbcf5d8684d79
Choose a head ref
Showing with 2 additions and 2 deletions.
  1. +2 −2 lightning-persister/src/util.rs
4 changes: 2 additions & 2 deletions lightning-persister/src/util.rs
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
extern crate winapi;

use std::fs;
use std::path::{Path, PathBuf};
use std::path::PathBuf;
use std::io::BufWriter;

#[cfg(not(target_os = "windows"))]
@@ -62,7 +62,7 @@ pub(crate) fn write_to_file<W: Writeable>(filename_with_path: String, data: &W)
#[cfg(target_os = "windows")]
{
let src = PathBuf::from(tmp_filename.clone());
if Path::new(&filename_with_path.clone()).exists() {
if full_dst_path.exists() {
unsafe {winapi::um::winbase::ReplaceFileW(
path_to_windows_str(full_dst_path).as_ptr(), path_to_windows_str(src).as_ptr(), std::ptr::null(),
winapi::um::winbase::REPLACEFILE_IGNORE_MERGE_ERRORS,