Skip to content

fix: correct file mode from 'w' to 'r' in path_to_file_list()#401

Open
winnercup1602 wants to merge 1 commit intoagwaBom:mainfrom
winnercup1602:main
Open

fix: correct file mode from 'w' to 'r' in path_to_file_list()#401
winnercup1602 wants to merge 1 commit intoagwaBom:mainfrom
winnercup1602:main

Conversation

@winnercup1602
Copy link
Copy Markdown

Problem

The function path_to_file_list() was opening the file in write mode ('w') instead of read mode ('r'), which would overwrite the file content instead of reading it.

Changes

  • Changed file mode from 'w' to 'r' in open() call
  • Added proper file reading with .read().split('\n') to return list of lines

Impact

This fix ensures the function correctly reads and returns file content as a list of lines without accidentally overwriting the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant