Skip to content

Commit a78037f

Browse files
committed
iox-eclipse-iceoryx#1196 More readable statement for valid paths with ending dots check
Signed-off-by: Christian Eltzschig <[email protected]>
1 parent 7f4e7e3 commit a78037f

File tree

1 file changed

+6
-1
lines changed
  • iceoryx_hoofs/include/iceoryx_hoofs/internal/cxx

1 file changed

+6
-1
lines changed

iceoryx_hoofs/include/iceoryx_hoofs/internal/cxx/helplets.inl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,13 @@ inline bool isValidPathEntry(const string<StringCapacity>& name,
5252
}
5353
}
5454

55+
if (nameSize == 0)
56+
{
57+
return true;
58+
}
59+
5560
// dot at the end is invalid to be compatible with windows api
56-
return !(nameSize != 0 && name[nameSize - 1] == '.');
61+
return !(name[nameSize - 1] == '.');
5762
}
5863

5964
template <uint64_t StringCapacity>

0 commit comments

Comments
 (0)