summaryrefslogtreecommitdiff
path: root/src/FileEntry.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2009-07-03 14:33:16 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2009-07-03 14:33:16 +0000
commite72c67a7ec1b7acc834d94dec1e0a92dec200278 (patch)
treea929b94b229af660583e20f4ed1fc0330fcc7529 /src/FileEntry.h
parent130f83009155fc936209a8eb4891f6fe7678504c (diff)
2009-07-03 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Show first URL in Download Results if file path is not available. * src/FileEntry.h
Diffstat (limited to 'src/FileEntry.h')
-rw-r--r--src/FileEntry.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/FileEntry.h b/src/FileEntry.h
index e98dc9e4..6d351ac7 100644
--- a/src/FileEntry.h
+++ b/src/FileEntry.h
@@ -273,17 +273,23 @@ void writeFilePath
o << "n/a";
} else {
if(e->getPath().empty()) {
- o << "n/a";
+ std::deque<std::string> uris;
+ e->getUris(uris);
+ if(uris.empty()) {
+ o << "n/a";
+ } else {
+ o << uris.front();
+ }
} else {
if(memory) {
o << "[MEMORY]" << File(e->getPath()).getBasename();
} else {
o << e->getPath();
}
- }
- size_t count = countRequestedFileEntry(first, last);
- if(count > 1) {
- o << " (" << count-1 << "more)";
+ size_t count = countRequestedFileEntry(first, last);
+ if(count > 1) {
+ o << " (" << count-1 << "more)";
+ }
}
}
}