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

[connector] bug/Import-document - invalid characters for windows #1700

Merged
merged 2 commits into from
Jan 16, 2024

Conversation

Megafredo
Copy link
Member

Proposed changes

  • Implementation of the detection system, and replacement of invalid characters when it is Windows

Related issues

  • No issue

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality using different use cases
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality

Further comments

@Megafredo Megafredo self-assigned this Jan 16, 2024

# If windows detection, replacement of problematic characters
if os_system == "nt":
file_name = file_name.replace(":", "_")
Copy link
Member

Choose a reason for hiding this comment

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

I suggest you use a regular expression to search and replace all invalid characters on windows, which are \<>:*?"|/

--> /[\\/:*?"<>|]/g

@SamuelHassine SamuelHassine merged commit fe5a083 into master Jan 16, 2024
2 checks passed
@SamuelHassine SamuelHassine deleted the bug/import-document branch January 16, 2024 10:50
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.

None yet

3 participants