Skip to content

Invalid characters in the path #555

Description

@kwantdev

I apologize if my question sounds silly but I just started using this library and can't find the answer to my question.
I'm trying to copy a file from my disk system to a memory file system:

mem_fs = fs.open_fs('mem://')
zip_path = 'C:\\project\\test.zip"
fs.copy.copy_file('/', zip_path.format(os.getcwd()), mem_fs, 'test.zip')

I have the following exception: fs.errors.InvalidCharsInPath because the path contains ":" and "\". If I replace all these "invalid" characters with "/" the resource can't be found.
The OS: Win7.
How can this issue be solved? And what is the cross-platform solution (I will run my app on Linux too)?
Thanks!

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions