SuperGouge / ChanThreadWatch

Fork of the original discontinued ChanThreadWatch.
90 stars 13 forks source link

Display status warning when download folder can't be found #23

Closed usernamestring closed 10 years ago

usernamestring commented 10 years ago

In older versions of CTW if a thread download folder was accidentally moved or deleted while still being in the watch list, the program would stop monitoring that thread and display an error message in the Status column. Now it just continues the time countdown without showing a warning or downloading anything. Is it possible to make CTW display a message or warning when a folder is missing?

SuperGouge commented 10 years ago

Does it generates an error in the log.txt when this happens?

usernamestring commented 10 years ago

Only after clicking on the watched thread to open its download folder:

System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start(ProcessStartInfo startInfo) at JDP.frmChanThreadWatch.<>c__DisplayClass1.b__0(Object s)

SuperGouge commented 10 years ago

When you delete the folder and wait for the thread to be re-downloaded, is everything correctly created?

usernamestring commented 10 years ago

No, in previous versions CTW would stop watching the thread completely and display "Error: download stopped" but now it keeps the countdown without giving a warning or re-downloading.

SuperGouge commented 10 years ago

I'm sorry but I can't see how it would have changed since I did not modify the exception handling but rather just added a logger. If you don't see this error anymore, you should consider it an improvement since it means it is not triggered in the first place rather than not warning about it.

Also, when a thread is re-downloaded (NOT when it is checked), the folder should be recreated properly. Note that timer hitting 0 does not mean it will do so since the thread might not be re-downloaded if there was no new post. If the folder cannot be created when the thread is re-downloaded, there will be an error anyway.