Skip to content

Commit

Permalink
Modpack fixes and UI improvements to editor
Browse files Browse the repository at this point in the history
  • Loading branch information
macarooni-man committed Feb 3, 2025
1 parent 5cae3ac commit 6a79e80
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion source/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -4631,6 +4631,9 @@ def get_mod_url(mod_data):
if os.path.exists(os.path.join(test_server, 'config')):
file_list.extend(glob(os.path.join(test_server, "config", "*.*")))

# Make sure they are actually files
file_list = [file for file in file_list if os.path.isfile(file)]

matches = {
'forge': 0,
'fabric': 0,
Expand Down Expand Up @@ -5925,7 +5928,11 @@ def fix_empty_properties(name):
valid_config_formats = ['properties', 'yml', 'yaml', 'tml', 'toml', 'json', 'json5', 'ini', 'txt']
def gather_config_files(name: str, max_depth: int = 3) -> dict[str, list[str]]:
root = server_path(name)
excludes = ['version_history.json', 'version_list.json', 'usercache.json', 'banned-players.json', 'banned-ips.json', 'whitelist.json', 'ops.json', server_ini]
excludes = [
'version_history.json', 'version_list.json', 'usercache.json', 'banned-players.json', 'banned-ips.json',
'whitelist.json', 'ops.json', 'ops.txt', 'whitelist.txt', 'banned-players.txt', 'banned-ips.txt', 'eula.txt',
'bans.txt', 'modrinth.index.json', server_ini
]
final_dict = {}

def process_dir(path: str, depth: int = 0):
Expand Down
2 changes: 1 addition & 1 deletion source/menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -22920,7 +22920,7 @@ def open_config_file(path: str, *a):
config_data['path'] = constants.telepath_download(server_obj._telepath_data, path)

# Check if file exits and pick the correct editor for the format
if os.path.isfile(path):
if config_data['path'] and os.path.isfile(config_data['path']):
editor_screen = None

if ext in ['properties', 'ini']:
Expand Down

0 comments on commit 6a79e80

Please sign in to comment.