mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-02 17:43:06 +02:00
Merge with 5ed61c63ba59f4748231ea14bbbc222423d0b08a
This commit is contained in:
@@ -37,7 +37,7 @@ public class FileUtils {
|
||||
* A set of characters that are prohibited from being in file names.
|
||||
*/
|
||||
private static final Pattern PROHIBITED_CHAR_PATTERN =
|
||||
Pattern.compile("[^ A-Za-z0-9_.()]+");
|
||||
Pattern.compile("[^ A-Za-z0-9_.()-]+");
|
||||
|
||||
/**
|
||||
* Builds a path inside the My Tracks directory in the SD card.
|
||||
@@ -69,8 +69,6 @@ public class FileUtils {
|
||||
* Normalizes the input string and make sure it is a valid fat32 file name.
|
||||
*
|
||||
* @param name the name to normalize
|
||||
* @param overheadSize the number of additional characters that will be added
|
||||
* to the name after sanitization
|
||||
* @return the sanitized name
|
||||
*/
|
||||
String sanitizeName(String name) {
|
||||
|
||||
@@ -31,8 +31,8 @@ import junit.framework.TestCase;
|
||||
* @author Rodrigo Damazio
|
||||
*/
|
||||
public class FileUtilsTest extends TestCase {
|
||||
private static final String ORIGINAL_NAME = "Swim\10ming ^across: the/ pacific (ocean).";
|
||||
private static final String SANITIZED_NAME = "Swimming across the pacific (ocean).";
|
||||
private static final String ORIGINAL_NAME = "Swim\10ming-^across: the/ pacific (ocean).";
|
||||
private static final String SANITIZED_NAME = "Swimming-across the pacific (ocean).";
|
||||
|
||||
private FileUtils fileUtils;
|
||||
private Set<String> existingFiles;
|
||||
|
||||
Reference in New Issue
Block a user