Skip to content

Commit d38b956

Browse files
committed
Fixed reading 'main_folder' from config
1 parent a75e17a commit d38b956

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

fcloud/config.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,12 @@ def read_config(available_clouds: list[str], path: Optional[Path] = None) -> Con
4949
"FCLOUD", "cfl_extension", error=ConfigError.cfl_extension_error, config=config
5050
)
5151
# main_folder
52-
main_folder = Path(
53-
get_config_data(
54-
"FCLOUD", "main_folder", error=ConfigError.main_folder_error, config=config
55-
)
56-
).as_posix()
52+
main_folder = get_config_data(
53+
"FCLOUD", "main_folder", error=ConfigError.main_folder_error, config=config
54+
)
55+
if not (main_folder.startswith("/") or main_folder.startswith("\\")):
56+
main_folder = "/" + main_folder
57+
main_folder = Path(main_folder).as_posix()
5758

5859
# Section, for cloud storage settings
5960
cloud_settings = get_config_data(

0 commit comments

Comments
 (0)