diff options
author | Siva Velusamy <vsiva@google.com> | 2012-07-25 17:02:08 -0700 |
---|---|---|
committer | Siva Velusamy <vsiva@google.com> | 2012-07-25 17:03:33 -0700 |
commit | 2c525a19d153f28b76ee70a9350371cd4a62c3f2 (patch) | |
tree | fa51d97104866c3af2777be8aa91f23a534e7ec3 /ddms | |
parent | df97f7f5c9f5148d32dac2e2ed98bc6862fe5fc6 (diff) | |
download | sdk-2c525a19d153f28b76ee70a9350371cd4a62c3f2.zip sdk-2c525a19d153f28b76ee70a9350371cd4a62c3f2.tar.gz sdk-2c525a19d153f28b76ee70a9350371cd4a62c3f2.tar.bz2 |
ddms fileservice: update characters that need escaping.
Add ampersand to the list of characters that need to be escaped.
Fix for http://code.google.com/p/android/issues/detail?id=34138
Change-Id: I48bdece34d41b713b3f61211528faaedc9a2b40f
Diffstat (limited to 'ddms')
-rw-r--r-- | ddms/libs/ddmlib/src/com/android/ddmlib/FileListingService.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/FileListingService.java b/ddms/libs/ddmlib/src/com/android/ddmlib/FileListingService.java index 8cfac8f..8d804d2 100644 --- a/ddms/libs/ddmlib/src/com/android/ddmlib/FileListingService.java +++ b/ddms/libs/ddmlib/src/com/android/ddmlib/FileListingService.java @@ -100,9 +100,11 @@ public final class FileListingService { * Represents an entry in a directory. This can be a file or a directory. */ public final static class FileEntry { - /** Pattern to escape filenames for shell command consumption. */ + /** Pattern to escape filenames for shell command consumption. + * This pattern identifies any special characters that need to be escaped with a + * backslash. */ private final static Pattern sEscapePattern = Pattern.compile( - "([\\\\()*+?\"'#/\\s])"); //$NON-NLS-1$ + "([\\\\()*+?\"'&#/\\s])"); //$NON-NLS-1$ /** * Comparator object for FileEntry |