sprotheroe / vagrant-disksize

Vagrant plugin to resize disks in VirtualBox
MIT License
479 stars 51 forks source link

Fix for #20: Handle Windows file paths from WSL #27

Open henning-erlandsen opened 5 years ago

henning-erlandsen commented 5 years ago

Running vagrant under WSL can confuse ruby as to how it should treat file paths. In this case it will treat the entire path as a filename, for example "C:\path\to\a\file.ext" will be parsed as

File.dirname(src) => "./"
File.basename(src) => "C:\path\to\a\file"

Replacing the back-slashes makes ruby recognize the windows path.

rockdreamer commented 5 years ago

Thank you for this, it has fixed the plugin for me on WSL.

nathan-fiscaletti commented 5 years ago

It's been nearly three months, @sprotheroe any chance that this will get merged?

samuliasmala commented 4 years ago

I can confirm it worked nicely so would be great to get this merged!

cdausmus commented 3 years ago

I've hit this issue too, can we get this merged please?

maica1 commented 2 years ago

I've needed this too, tried this fix and worked. Thank you.

mathix420 commented 2 years ago

Needed here too! Would be nice to merge that PR

rajadain commented 1 year ago

I really need this merged as well. Any ideas how to use this variation until this is merged?