[BUGFIX] Fixes the crash when the folder doesn't exist - #294
Conversation
92d489b to
4cb5107
Compare
Branch updated — SUBPROCESS_ENCODING removed, crash fix keptThanks for the two fixes in this PR! I've trimmed the branch so only the Why SUBPROCESS_ENCODING was removedThe intent — making the encoding configurable to handle Turkish (cp857) and similar non-UTF-8 Windows locales — is a good instinct, but the constant as written still hardcodes If a future improvement is wanted to decode the output correctly (rather than escaping bad bytes), the right approach would be to detect the system encoding at runtime: import locale
encoding = locale.getpreferredencoding(False) # returns e.g. "cp857" on Turkish WindowsThat would be a separate PR on top of the current state. What was keptThe |
treee111
left a comment
There was a problem hiding this comment.
thanks for your PR @sinancetinkaya !
For some reason if the path doesn't exist, program crashes. To prevent this, the path has to be checked