Skip to content

Commit

Permalink
Fix DoubleSlashed root in fileutils::getRelativePath
Browse files Browse the repository at this point in the history
  • Loading branch information
frostmorn committed Mar 30, 2024
1 parent 268d250 commit 19ba12f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sdk/lib/lilka/src/lilka/fileutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@ const String FileUtils::getFullPath(const FS* fSysDriver, const String& path) {
const String FileUtils::getRelativePath(const String& path) {
String relativePath;
if (path.startsWith(LILKA_SDROOT LILKA_SLASH)) {
relativePath = "/" + path.substring(LILKA_SDROOT_LEN);
relativePath = path.substring(LILKA_SDROOT_LEN);
} else if (path.startsWith(LILKA_SPIFFS_ROOT LILKA_SLASH)) {
relativePath = "/" + path.substring(LILKA_SPIFFS_ROOT_LEN);
relativePath = path.substring(LILKA_SPIFFS_ROOT_LEN);
} else
// Maybe path is allready relative?
relativePath = path;
Expand Down

0 comments on commit 19ba12f

Please sign in to comment.