Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
js: ~~/init.js: use mp.find_config_file
The problem with the previous code - which used mp.get_user_path, is that it returns a path even with --no-config, and even if the file doesn't exist. This is why we tested the "config" property, and also used mp.utils.file_info to check that the file exists. mp.find_config_file doesn't return a path with no-cofig and doesn't return a path if the file doesn't exists. It's simpler and better.
- Loading branch information