mifi / lossless-cut

The swiss army knife of lossless video/audio editing
GNU General Public License v2.0
24.01k stars 1.19k forks source link

Custom folder paths for exports on Windows #1979

Open t3dotgg opened 2 months ago

t3dotgg commented 2 months ago

The fewer issues I have to read, the more new features I will have time to implement, so I ask that you please try these things first

Description

I cut an issue about bad folder directories being created on Windows awhile ago https://github.com/mifi/lossless-cut/issues/1790

Just set up a new PC and updated to latest Lossless-Cut. Didn't realize I wouldn't be able to export to per-segment directories anymore :(

Ideally I'd still be able to use (dynamic) folder names on Windows. If not, I think a better error here would be nice.

Also thought that turning off sanitization should let me do this still :(

image
mifi commented 1 month ago

Hmm, I just tested on windows 11 and I'm not getting this error on 3.59.1 when including a slash, and it's correctly creating the clips directory for me.

What I'm suspecting is that one of your segments' SEG_LABEL variable contains disallowed characters. If you click on Preview button, what do you see as "resulting file names"? on windows, when sanitize is "off", the following characters are not allowed: '<', '>', ':', '"', '|', '?', '*'

https://github.com/mifi/lossless-cut/blob/9ea438052f05d019e4594d4fd978b15b83862e1a/src/renderer/src/util/outputNameTemplate.ts#L34

I think a better error here would be nice.

I will improve the error message to specify exactly which characters are invalid.