Merge with 5ed61c63ba59f4748231ea14bbbc222423d0b08a

This commit is contained in:
Bartlomiej Niechwiej
2010-10-26 19:38:51 -07:00
parent 02b5601933
commit dbd8e6c0e9
2 changed files with 3 additions and 5 deletions
@@ -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;