Skip to content

Commit

Permalink
dtoolutil/express: Resolving empty filename should yield no result
Browse files Browse the repository at this point in the history
See panda3d#1140 - I may revert this if someone can demonstrate a compelling use case (for current directory, you can use "." instead), but it seems to have the potential to cause unintuitive behavior.
  • Loading branch information
rdb committed Apr 9, 2021
1 parent ee20213 commit 0617e40
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/dtoolutil/dSearchPath.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,10 @@ get_directory(size_t n) const {
*/
Filename DSearchPath::
find_file(const Filename &filename) const {
if (filename.empty()) {
return string();
}

if (filename.is_local()) {
if (_directories.empty()) {
// Let's say an empty search path is the same as a search path
Expand Down

0 comments on commit 0617e40

Please sign in to comment.