Skip to content

Commit

Permalink
Added check for existence of sound file.
Browse files Browse the repository at this point in the history
Also, plugin.json version bump.
  • Loading branch information
lances101 committed Jun 23, 2016
1 parent c1a31bb commit 0b686ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Wox.Plugin.SimpleClock/Commands/AlarmCommand.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Wox.Infrastructure;
using Wox.Plugin.SimpleClock.Views;
Expand Down Expand Up @@ -43,7 +44,7 @@ private void AlarmTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)

alarmToFire.Fired = true;

if (String.IsNullOrEmpty(ClockSettingsWrapper.Settings.AlarmTrackPath))
if (String.IsNullOrEmpty(ClockSettingsWrapper.Settings.AlarmTrackPath) || !File.Exists(ClockSettingsWrapper.Settings.AlarmTrackPath))
{
ClockSettingsWrapper.Settings.AlarmTrackPath = System.IO.Path.Combine(Context.CurrentPluginMetadata.PluginDirectory, "Sounds\\beepbeep.mp3");
}
Expand Down
2 changes: 1 addition & 1 deletion Wox.Plugin.SimpleClock/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"Name":"Wox.Plugin.SimpleClock",
"Description":"Simple Clock",
"Author":"Boris Makogonyuk (boromak)",
"Version":"1.0.2",
"Version":"1.0.3",
"Language":"csharp",
"Website":"http://boromak.com/",
"IcoPath": "Images\\alarm_full.png",
Expand Down

0 comments on commit 0b686ca

Please sign in to comment.