mirror of
https://github.com/nzbget/nzbget.git
synced 2026-01-05 04:27:55 -05:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa78a360fe |
@@ -673,21 +673,13 @@ bool ArticleDownloader::PrepareFile(char* szLine)
|
||||
/* creates output file and subdirectores */
|
||||
bool ArticleDownloader::CreateOutputFile(int iSize)
|
||||
{
|
||||
if (g_pOptions->GetDirectWrite() && Util::FileExists(m_szOutputFilename) &&
|
||||
Util::FileSize(m_szOutputFilename) == iSize)
|
||||
{
|
||||
// keep existing old file from previous program session
|
||||
return true;
|
||||
}
|
||||
|
||||
// delete eventually existing old file from previous program session
|
||||
remove(m_szOutputFilename);
|
||||
|
||||
// ensure the directory exist
|
||||
char szDestDir[1024];
|
||||
int iMaxlen = Util::BaseFileName(m_szOutputFilename) - m_szOutputFilename;
|
||||
if (iMaxlen > 1024-1) iMaxlen = 1024-1;
|
||||
strncpy(szDestDir, m_szOutputFilename, iMaxlen);
|
||||
strncpy(szDestDir, m_szOutputFilename, iMaxlen < 1024 ? iMaxlen : 1024-1);
|
||||
szDestDir[iMaxlen] = '\0';
|
||||
|
||||
if (!Util::ForceDirectories(szDestDir))
|
||||
@@ -1045,8 +1037,7 @@ void ArticleDownloader::CompleteFileParts()
|
||||
debug("Checking old dir for: %s", m_szOutputFilename);
|
||||
char szOldDestDir[1024];
|
||||
int iMaxlen = Util::BaseFileName(m_szOutputFilename) - m_szOutputFilename;
|
||||
if (iMaxlen > 1024-1) iMaxlen = 1024-1;
|
||||
strncpy(szOldDestDir, m_szOutputFilename, iMaxlen);
|
||||
strncpy(szOldDestDir, m_szOutputFilename, iMaxlen < 1024 ? iMaxlen : 1024-1);
|
||||
szOldDestDir[iMaxlen] = '\0';
|
||||
if (Util::DirEmpty(szOldDestDir))
|
||||
{
|
||||
|
||||
11
ChangeLog
11
ChangeLog
@@ -1,14 +1,3 @@
|
||||
nzbget-10.2:
|
||||
- fixed potential segfault which could happen with file paths longer
|
||||
than 1024 characters;
|
||||
- fixed: when options <DirectWrite> and <ContinuePartial> were both
|
||||
active, a restart or reload of the program during download may cause
|
||||
damaged files in the active download;
|
||||
- increased width of speed indication ui-element to avoid layout
|
||||
breaking on some linux-browsers;
|
||||
- fixed a race condition in unpacker which could lead to a segfault
|
||||
(although the chances were low because the code wasn't executed often).
|
||||
|
||||
nzbget-10.1:
|
||||
- fixed: articles with decoding errors (incomplete or damaged posts)
|
||||
caused infinite retry-loop in downloader.
|
||||
|
||||
20
Unpack.cpp
20
Unpack.cpp
@@ -156,16 +156,19 @@ void UnpackController::Run()
|
||||
|
||||
if (m_bHasRarFiles)
|
||||
{
|
||||
m_pPostInfo->SetProgressLabel("");
|
||||
ExecuteUnrar();
|
||||
}
|
||||
|
||||
if (m_bHasSevenZipFiles && m_bUnpackOK)
|
||||
{
|
||||
m_pPostInfo->SetProgressLabel("");
|
||||
ExecuteSevenZip(false);
|
||||
}
|
||||
|
||||
if (m_bHasSevenZipMultiFiles && m_bUnpackOK)
|
||||
{
|
||||
m_pPostInfo->SetProgressLabel("");
|
||||
ExecuteSevenZip(true);
|
||||
}
|
||||
|
||||
@@ -220,9 +223,8 @@ void UnpackController::ExecuteUnrar()
|
||||
m_bAllOKMessageReceived = false;
|
||||
m_eUnpacker = upUnrar;
|
||||
|
||||
SetProgressLabel("");
|
||||
int iExitCode = Execute();
|
||||
SetProgressLabel("");
|
||||
m_pPostInfo->SetProgressLabel("");
|
||||
|
||||
m_bUnpackOK = iExitCode == 0 && m_bAllOKMessageReceived && !GetTerminated();
|
||||
m_bUnpackStartError = iExitCode == -1;
|
||||
@@ -268,9 +270,8 @@ void UnpackController::ExecuteSevenZip(bool bMultiVolumes)
|
||||
m_eUnpacker = upSevenZip;
|
||||
|
||||
PrintMessage(Message::mkInfo, "Executing 7-Zip");
|
||||
SetProgressLabel("");
|
||||
int iExitCode = Execute();
|
||||
SetProgressLabel("");
|
||||
m_pPostInfo->SetProgressLabel("");
|
||||
|
||||
m_bUnpackOK = iExitCode == 0 && m_bAllOKMessageReceived && !GetTerminated();
|
||||
m_bUnpackStartError = iExitCode == -1;
|
||||
@@ -582,7 +583,7 @@ void UnpackController::AddMessage(Message::EKind eKind, bool bDefaultKind, const
|
||||
|
||||
if (m_eUnpacker == upUnrar && !strncmp(szMsgText, "Extracting ", 11))
|
||||
{
|
||||
SetProgressLabel(szMsgText);
|
||||
m_pPostInfo->SetProgressLabel(szMsgText);
|
||||
}
|
||||
|
||||
if (m_eUnpacker == upUnrar && !strncmp(szText, "Extracting from ", 16))
|
||||
@@ -590,7 +591,7 @@ void UnpackController::AddMessage(Message::EKind eKind, bool bDefaultKind, const
|
||||
const char *szFilename = szText + 16;
|
||||
debug("Filename: %s", szFilename);
|
||||
m_archiveFiles.push_back(strdup(szFilename));
|
||||
SetProgressLabel(szText);
|
||||
m_pPostInfo->SetProgressLabel(szText);
|
||||
}
|
||||
|
||||
if ((m_eUnpacker == upUnrar && !strncmp(szText, "All OK", 6)) ||
|
||||
@@ -607,13 +608,6 @@ void UnpackController::Stop()
|
||||
Terminate();
|
||||
}
|
||||
|
||||
void UnpackController::SetProgressLabel(const char* szProgressLabel)
|
||||
{
|
||||
g_pDownloadQueueHolder->LockQueue();
|
||||
m_pPostInfo->SetProgressLabel(szProgressLabel);
|
||||
g_pDownloadQueueHolder->UnlockQueue();
|
||||
}
|
||||
|
||||
|
||||
void MoveController::StartMoveJob(PostInfo* pPostInfo)
|
||||
{
|
||||
|
||||
1
Unpack.h
1
Unpack.h
@@ -81,7 +81,6 @@ protected:
|
||||
bool HasParFiles();
|
||||
bool HasBrokenFiles();
|
||||
void CheckArchiveFiles();
|
||||
void SetProgressLabel(const char* szProgressLabel);
|
||||
#ifndef DISABLE_PARCHECK
|
||||
void RequestParCheck(bool bRename);
|
||||
#endif
|
||||
|
||||
20
configure
vendored
20
configure
vendored
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.61 for nzbget 10.2.
|
||||
# Generated by GNU Autoconf 2.61 for nzbget 10.1.
|
||||
#
|
||||
# Report bugs to <hugbug@users.sourceforge.net>.
|
||||
#
|
||||
@@ -574,8 +574,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='nzbget'
|
||||
PACKAGE_TARNAME='nzbget'
|
||||
PACKAGE_VERSION='10.2'
|
||||
PACKAGE_STRING='nzbget 10.2'
|
||||
PACKAGE_VERSION='10.1'
|
||||
PACKAGE_STRING='nzbget 10.1'
|
||||
PACKAGE_BUGREPORT='hugbug@users.sourceforge.net'
|
||||
|
||||
ac_unique_file="nzbget.cpp"
|
||||
@@ -1235,7 +1235,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures nzbget 10.2 to adapt to many kinds of systems.
|
||||
\`configure' configures nzbget 10.1 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1306,7 +1306,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of nzbget 10.2:";;
|
||||
short | recursive ) echo "Configuration of nzbget 10.1:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1452,7 +1452,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
nzbget configure 10.2
|
||||
nzbget configure 10.1
|
||||
generated by GNU Autoconf 2.61
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
|
||||
@@ -1466,7 +1466,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by nzbget $as_me 10.2, which was
|
||||
It was created by nzbget $as_me 10.1, which was
|
||||
generated by GNU Autoconf 2.61. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -2262,7 +2262,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE=nzbget
|
||||
VERSION=10.2
|
||||
VERSION=10.1
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@@ -9283,7 +9283,7 @@ exec 6>&1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by nzbget $as_me 10.2, which was
|
||||
This file was extended by nzbget $as_me 10.1, which was
|
||||
generated by GNU Autoconf 2.61. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -9336,7 +9336,7 @@ Report bugs to <bug-autoconf@gnu.org>."
|
||||
_ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF
|
||||
ac_cs_version="\\
|
||||
nzbget config.status 10.2
|
||||
nzbget config.status 10.1
|
||||
configured by $0, generated by GNU Autoconf 2.61,
|
||||
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT(nzbget, 10.2, hugbug@users.sourceforge.net)
|
||||
AC_INIT(nzbget, 10.1, hugbug@users.sourceforge.net)
|
||||
AC_CANONICAL_SYSTEM
|
||||
AM_INIT_AUTOMAKE(nzbget, 10.2)
|
||||
AM_INIT_AUTOMAKE(nzbget, 10.1)
|
||||
AC_CONFIG_SRCDIR([nzbget.cpp])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
|
||||
|
||||
@@ -225,7 +225,7 @@ body.navfixed.scrolled .navbar-fixed-top .navbar-inner {
|
||||
margin-right: 10px;
|
||||
padding-top: 2px;
|
||||
cursor: pointer;
|
||||
width: 86px;
|
||||
width: 85px;
|
||||
}
|
||||
|
||||
#InfoBlock div {
|
||||
|
||||
Reference in New Issue
Block a user