Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PluginManager: capitalize folder and rename constant #1445

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,10 @@ object PluginManager {
return getKey(PLUGINS_KEY_LOCAL) ?: emptyArray()
}

private val CLOUD_STREAM_FOLDER =
Environment.getExternalStorageDirectory().absolutePath + "/Cloudstream3/"
private val CLOUDSTREAM3_FOLDER =
Environment.getExternalStorageDirectory().absolutePath + "/CloudStream3/"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Linux file system treats file and directory names as case-sensitive" so this will break all current plugins that are located in "Cloudstream3". Loop all folders that match Cloudstream3 in a case insensitive manner if you want to solve this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense.


private val LOCAL_PLUGINS_PATH = CLOUD_STREAM_FOLDER + "plugins"
private val LOCAL_PLUGINS_PATH = CLOUDSTREAM3_FOLDER + "plugins"

var currentlyLoading: String? = null

Expand Down Expand Up @@ -464,7 +464,7 @@ object PluginManager {
**/
fun checkSafeModeFile(): Boolean {
return normalSafeApiCall {
val folder = File(CLOUD_STREAM_FOLDER)
val folder = File(CLOUDSTREAM3_FOLDER)
if (!folder.exists()) return@normalSafeApiCall false
val files = folder.listFiles { _, name ->
name.equals("safe", ignoreCase = true)
Expand Down
Loading