TwitchDownloader icon indicating copy to clipboard operation
TwitchDownloader copied to clipboard

Add warning before overwrite file

Open atomsbaza opened this issue 10 months ago • 4 comments

  • Resolves #997

TODO:

  • Warning message and ReadLine input to confirm before overwriting the file

Feedback is welcomed.

atomsbaza avatar Apr 11 '24 17:04 atomsbaza

Thank you for the PR, however there are several issues:

  1. This will only work for the CLI. As it stands, this would completely break the Windows GUI
  2. Continuing on y, else failing is poor design in my opinion. The user should be explicitly required to confirm or reject, otherwise the program should ask again.
  3. How will this work for 3rd party libraries that wrap TDCLI? They cannot reasonably work around this.
  4. How will this work with status disabled? (--log-level None)
  5. What about chat updater and chat renderer?

ScrubN avatar Apr 11 '24 18:04 ScrubN

Thank you for the PR, however there are several issues:

  1. This will only work for the CLI. As it stands, this would completely break the Windows GUI
  2. Continuing on y, else failing is poor design in my opinion. The user should be explicitly required to confirm or reject, otherwise the program should ask again.
  3. How will this work for 3rd party libraries that wrap TDCLI? They cannot reasonably work around this.
  4. How will this work with status disabled? (--log-level None)
  5. What about chat updater and chat renderer?

Thank you for your feedback. To answer question

  1. For Windows GUI I think it isn't needed because Windows already asks to confirm before saving the file but I'm not sure that will cover all necessary because I'm using macOS so I will look for a solution again.
  2. I'm gonna improve it as you ask.
  3. I'm gonna looking ways to make it work.
  4. I will add more logs that can be used from ITaskLogger.
  5. I will add a warning for chat updater and chat rederer

atomsbaza avatar Apr 12 '24 05:04 atomsbaza

  1. For Windows GUI I think it isn't needed because Windows already asks to confirm before saving the file but I'm not sure that will cover all necessary because I'm using macOS so I will look for a solution again.

The Windows save file dialog does not delete files when a user clicks "yes". Because of that, your changes break the Windows GUI completely due to scanning Console.In. rider64_wmqsy6BIuZ (1)

ScrubN avatar Apr 12 '24 16:04 ScrubN

  1. For Windows GUI I think it isn't needed because Windows already asks to confirm before saving the file but I'm not sure that will cover all necessary because I'm using macOS so I will look for a solution again.

The Windows save file dialog does not delete files when a user clicks "yes". Because of that, your changes break the Windows GUI completely due to scanning Console.In. rider64_wmqsy6BIuZ (1) rider64_wmqsy6BIuZ (1)

I see what happen now. Thank you for your feedback will work in-progress

atomsbaza avatar Apr 12 '24 20:04 atomsbaza

@ScrubN could you please explain more about the status disabled (--log-level None)

atomsbaza avatar May 19 '24 14:05 atomsbaza

When --log-level None is passed, nothing is written to stdout except for uncaught exceptions.

ScrubN avatar May 20 '24 20:05 ScrubN

Thanks, @ScrubN Could you please review this PR after I complete my changes?

atomsbaza avatar May 21 '24 18:05 atomsbaza