[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [metrics-lib/master] Make tests pass again and solve task-22190.
commit e927475c12db02e492075e8a6a580e2626c94037
Author: iwakeh <iwakeh@xxxxxxxxxxxxxx>
Date: Tue May 9 15:17:09 2017 +0000
Make tests pass again and solve task-22190.
---
.../org/torproject/descriptor/index/DescriptorIndexCollector.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/torproject/descriptor/index/DescriptorIndexCollector.java b/src/main/java/org/torproject/descriptor/index/DescriptorIndexCollector.java
index 68b6591..4796263 100644
--- a/src/main/java/org/torproject/descriptor/index/DescriptorIndexCollector.java
+++ b/src/main/java/org/torproject/descriptor/index/DescriptorIndexCollector.java
@@ -144,7 +144,9 @@ public class DescriptorIndexCollector implements DescriptorCollector {
File localDir, SortedMap<String, Long> locals) {
for (String localPath : locals.keySet()) {
for (String remoteDirectory : remoteDirectories) {
- if (localPath.startsWith(remoteDirectory)) {
+ String remDir = remoteDirectory.charAt(0) == '/'
+ ? remoteDirectory.substring(1) : remoteDirectory;
+ if (localPath.startsWith(remDir)) {
if (!remoteFiles.containsKey(localPath)) {
File extraneousLocalFile = new File(localDir, localPath);
log.debug("Deleting extraneous local file {}.",
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits