summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2023-03-21 12:28:28 +0000
committerAidan MacDonald <amachronic@protonmail.com>2023-03-24 19:02:56 +0000
commitaab6a44fc56f4747d926987d9e848dfcab9c209e (patch)
treeea3ba346e6e80f355bd1a3ec2a521cf3c6a2e940
parent1f1893f520719a701d0a88632217c76e744d67bc (diff)
downloadrockbox-aab6a44fc5.tar.gz
rockbox-aab6a44fc5.zip
filetree: Remove dead code in ft_build_playlist()
This checks for an out of memory condition when the filenames were buffered in RAM. The playlist no longer buffers anything in RAM so the code is unreachable. Change-Id: I4c2d0b2ac4ba3b7e7c94fe554a0cf7cb1a798e09
-rw-r--r--apps/filetree.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/apps/filetree.c b/apps/filetree.c
index 2d4416df5a..b652b6515b 100644
--- a/apps/filetree.c
+++ b/apps/filetree.c
@@ -94,23 +94,7 @@ int ft_build_playlist(struct tree_context* c, int start_index)
}
}
- if (res == -2) /* name buffer is full store to disk? */
- {
- if (yesno_pop(ID2P(LANG_CATALOG_ADD_TO_NEW)))
- {
- char playlist_dir[MAX_PATH];
- strmemccpy(playlist_dir, c->currdir, sizeof(playlist_dir));
- tree_unlock_cache(c);
- if (playlist_create(playlist_dir, "dynamic.m3u8") >= 0)
- {
- playlist_insert_directory(NULL, playlist_dir,
- PLAYLIST_REPLACE, false, false);
- }
- }
- }
- else
- tree_unlock_cache(c);
-
+ tree_unlock_cache(c);
return start_index;
}