mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
ability to use unicode in the scheme name — use _ as replacement by default (as our current impl)
This commit is contained in:
@@ -234,7 +234,7 @@ private val LOG = Logger.getInstance("#com.intellij.openapi.util.io.FileUtil")
|
||||
private val illegalChars = setOf('/', '\\', '?', '<', '>', ':', '*', '|', '"', ':')
|
||||
|
||||
// https://github.com/parshap/node-sanitize-filename/blob/master/index.js
|
||||
fun sanitizeFileName(name: String, replacement: String? = null, isTruncate: Boolean = true): String {
|
||||
fun sanitizeFileName(name: String, replacement: String? = "_", isTruncate: Boolean = true): String {
|
||||
var result: StringBuilder? = null
|
||||
var last = 0
|
||||
val length = name.length
|
||||
|
||||
Reference in New Issue
Block a user