CensoredUsername / unrpyc

A ren'py script decompiler
Other
821 stars 149 forks source link

fixes glob return behavior #198

Closed madeddy closed 3 months ago

madeddy commented 4 months ago

A invalid path input resulted in a return of 'None' from 'glob'. The followup error msg was so unclear.


I'm just not sure if the strict in resolve() should be removed. Depends if the glob() output really legit is or unsure.

CensoredUsername commented 3 months ago

The strict doesn't particularly matter, either it gets resolved here or later. Looks like this restores the original behaviour. I might also enable recursive globs in a later commit because honestly, that's what I want 99% of the time.

madeddy commented 3 months ago

Looks like this restores the original behaviour.

Yes, to diverge from this was never the intent. 😕

I might also enable recursive globs in a later commit

I did try to do this with pathlib.glob(to get this into pathlike at earliest), however i got a not so nice experience. There is no way to get this working with wildcards and absolute paths. Half-assed implemented i call this. Path(left).glob(right) wants always a path on the left side and a pattern on the right. Trying to put this in there from the argparse inputs would be a interesting show.