Skip to content

Commit 5ae8bb1

Browse files
amabluea-maurice
authored andcommitted
Only include the "/" at the end of a URL if it is necessary. This fixes one of
the tests in the Unity testapp that is currently failing. PiperOrigin-RevId: 246567212
1 parent b2fb4e2 commit 5ae8bb1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

database/src/desktop/database_reference_desktop.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,10 @@ Database* DatabaseReferenceInternal::GetDatabase() const {
7878
std::string DatabaseReferenceInternal::GetUrl() const {
7979
std::stringstream url;
8080
url << database_->database_url();
81-
url << '/';
82-
url << query_spec_.path.str();
81+
if (!query_spec_.path.str().empty()) {
82+
url << '/';
83+
url << query_spec_.path.str();
84+
}
8385
return url.str();
8486
}
8587

0 commit comments

Comments
 (0)