dokan-dev / dokan-sshfs

Dokan SSHFS
277 stars 60 forks source link

parse function in ParseArgs code problem #18

Closed akakakakakaa closed 6 years ago

akakakakakaa commented 6 years ago

I'm github newbie. I don't know well how to write issue. Sorry.

It's simple.

in parse function,

        for (int i = 0; i < args.Length; ++i)
        {
            if ((args[i][0] == '-' || args[i][0] == '/')
                && args[i].Length > 1
                && i + i < args.Length)

args.Length condition check i + i. It need to change i + 1.

and

            if (args[i].Contains("@"))
            {
                user = args[i].Substring(0, args[i].IndexOf('@'));

                host = args[i].Substring(args[i].IndexOf('@') + 1);
                if (host.Contains(":"))
                {
                    root = host.Substring(host.IndexOf(':') + 1);
                    host = host.Substring(0, host.IndexOf(':'));
                }
            }
            else
            {
                drive = args[i][0];
            }

in this code, drive changes to first character of last option.

Liryna commented 6 years ago

Hi @akakakakakaa ,

Thank you for your report. Here is the two commit I did releated to this issue: https://github.com/dokan-dev/dokan-sshfs/commit/2478b00646b5248e21444352c914f35b160e06dc https://github.com/dokan-dev/dokan-sshfs/commit/09006d8537c843b4153624b72a4b382c03e06cd0

Is that alright for you ?

akakakakakaa commented 6 years ago

Ok, Thanks!

and when I use in win10, It is not working. But, I don't know why.

It's another issue. I'll search.