occivink / mpv-gallery-view

Gallery-view scripts for mpv
The Unlicense
195 stars 21 forks source link

Repair mkdir on Windows #47

Closed Creator-Lin closed 1 year ago

occivink commented 1 year ago

Can you elaborate, what's wrong with just using 'mkdir', thumbs_dir?

Creator-Lin commented 1 year ago

After testing on Windows 10 22H2, the thumbs_dir couldn't be created without playback_only = false and args = { "cmd", "/C", "mkdir " .. thumbs_dir }. Did you test just using the args = { 'mkdir', thumbs_dir } on Windows? and could the thumbs_dir be created?

occivink commented 1 year ago

I don't have a way to test on windows so I do not know if the previous implementation was at all functional. The playback_only = false change makes total sense, the name = "subprocess" does not I think, the "cmd ", "/C" one I'm not sure

Creator-Lin commented 1 year ago

Hi occivink! I have found this in the mpv project which could do help to the use of utils.subprocess on windows. Maybe this could explain why to use cmd and /c args on windows.(As powershell are similar to cmd on windows and echo and mkdir are both basic command on windows.) By the way, the name arg was not a matter, as using utils.subprocess would automatically set the name arg to subprocess just as what mentioned in the offical mpv document. Best Regards.