Skip to content

Commit

Permalink
relaxed filename restrictions
Browse files Browse the repository at this point in the history
  • Loading branch information
NotImplementedLife committed Dec 8, 2023
1 parent 7f4a9fc commit 1558a81
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion arm9/source/filesystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ void LocationsProvider::load()
void LocationsProvider::add_location(Location* location)
{
locations.push_back(location);
save();
save();
}

Location* LocationsProvider::get_at(int i) const
Expand Down
8 changes: 6 additions & 2 deletions arm9/source/playlists_scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,12 @@ class PlaylistsScene : public SimpleScene
Debug::log(entry->d_name);

int len = strlen(entry->d_name);
if(len!=28) continue;
if(len>28) continue;
if(strcmp(".ppm", entry->d_name+len-4)!=0 && strcmp(".PPM", entry->d_name+len-4)!=0)
continue;

len-=4;

Debug::log("Here?");

for(int i=0;i<len;i++)
Expand Down Expand Up @@ -494,10 +496,12 @@ class PlaylistsScene : public SimpleScene
Debug::log(entry->d_name);

int len = strlen(entry->d_name);
if(len!=28) continue;
if(len>28) continue;
if(strcmp(".ppm", entry->d_name+len-4)!=0 && strcmp(".PPM", entry->d_name+len-4)!=0)
continue;

len-=4;

Debug::log("Here?");

for(int i=0;i<len;i++)
Expand Down

0 comments on commit 1558a81

Please sign in to comment.