From f656b2e62e439649da8af3f4d8d51af003ddb0af Mon Sep 17 00:00:00 2001 From: David Kocik Date: Tue, 17 Jan 2023 14:09:42 +0100 Subject: [PATCH] downloader: empty file fix --- src/slic3r/GUI/DownloaderFileGet.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/slic3r/GUI/DownloaderFileGet.cpp b/src/slic3r/GUI/DownloaderFileGet.cpp index deac45ad5..2e591a75a 100644 --- a/src/slic3r/GUI/DownloaderFileGet.cpp +++ b/src/slic3r/GUI/DownloaderFileGet.cpp @@ -163,6 +163,8 @@ void FileGet::priv::get_perform() m_stopped = true; fclose(file); cancel = true; + if (m_written == 0) + std::remove(m_tmp_path.string().c_str()); wxCommandEvent* evt = new wxCommandEvent(EVT_DWNLDR_FILE_PAUSED); evt->SetInt(m_id); m_evt_handler->QueueEvent(evt);