diff options
Diffstat (limited to 'Duplicati/CommandLine')
-rw-r--r-- | Duplicati/CommandLine/Commands.cs | 5 | ||||
-rw-r--r-- | Duplicati/CommandLine/ConsoleOutput.cs | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/Duplicati/CommandLine/Commands.cs b/Duplicati/CommandLine/Commands.cs index a4bb1fe08..fe0d473c0 100644 --- a/Duplicati/CommandLine/Commands.cs +++ b/Duplicati/CommandLine/Commands.cs @@ -545,6 +545,11 @@ namespace Duplicati.CommandLine {
using (var periodicOutput = new PeriodicOutput(output, TimeSpan.FromSeconds(5)))
{
+ if ((new Duplicati.Library.Main.Options(options)).DisableOnBattery && (Duplicati.Library.Utility.Power.PowerSupply.GetSource() == Duplicati.Library.Utility.Power.PowerSupply.Source.Battery))
+ {
+ output.MessageEvent("The \"disable-on-battery\" option only affects scheduled backups and is ignored by backups run manually or from the command line.");
+ }
+
output.MessageEvent(string.Format("Backup started at {0}", DateTime.Now));
output.PhaseChanged += (phase, previousPhase) =>
diff --git a/Duplicati/CommandLine/ConsoleOutput.cs b/Duplicati/CommandLine/ConsoleOutput.cs index 1dbd53674..6ff5814aa 100644 --- a/Duplicati/CommandLine/ConsoleOutput.cs +++ b/Duplicati/CommandLine/ConsoleOutput.cs @@ -24,7 +24,7 @@ namespace Duplicati.CommandLine {
public class ConsoleOutput : Library.Main.IMessageSink, IDisposable
{
- private object m_lock = new object();
+ private readonly object m_lock = new object();
public bool QuietConsole { get; private set; }
public bool VerboseErrors { get; private set; }
|