mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-28 03:22:16 +02:00
Correctly handle files which contain '%' as invalid files (#1343)
* Fix checking filenames which contain '%' which should be classified as invalid based on the MS OneDrive API Invalid characters designation
This commit is contained in:
parent
10606293f7
commit
6bec0ddc64
|
@ -205,7 +205,7 @@ bool isValidName(string path)
|
||||||
// Leading whitespace and trailing whitespace/dot
|
// Leading whitespace and trailing whitespace/dot
|
||||||
`^\s.*|^.*[\s\.]$|` ~
|
`^\s.*|^.*[\s\.]$|` ~
|
||||||
// Invalid characters
|
// Invalid characters
|
||||||
`.*[<>:"\|\?*/\\].*|` ~
|
`.*[<>:"\|\?*/\\%].*|` ~
|
||||||
// Reserved device name and trailing .~
|
// Reserved device name and trailing .~
|
||||||
`(?:^CON|^PRN|^AUX|^NUL|^COM[0-9]|^LPT[0-9])(?:[.].+)?$`
|
`(?:^CON|^PRN|^AUX|^NUL|^COM[0-9]|^LPT[0-9])(?:[.].+)?$`
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue