mirror of
				https://github.com/RicterZ/nhentai.git
				synced 2025-11-04 02:50:55 +01:00 
			
		
		
		
	Merge pull request #147 from fuchs2711/fix-win32-filename
Fix invalid filenames on Windows
This commit is contained in:
		@@ -233,6 +233,10 @@ and append a file extension like '.txt', so I avoid the potential of using
 | 
			
		||||
an invalid filename.
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
    if sys.platform.startswith('win32'):
 | 
			
		||||
        invalid_chars = '\/:*?"<>|.'
 | 
			
		||||
        for char in invalid_chars:
 | 
			
		||||
            s = s.replace(char, '_')
 | 
			
		||||
    return s
 | 
			
		||||
 | 
			
		||||
    # maybe you can use `--format` to select a suitable filename
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user