[virt-tools-list] Paths with whitespace in guestfish

Robert Nichols rnicholsNOSPAM at comcast.net
Thu Nov 19 01:15:42 UTC 2015


On 11/18/2015 08:22 AM, Richard W.M. Jones wrote:
  double quoting) is the correct one and works
> fine for me:
>
>> <fs> ls "/Program Files/Windows NT/Accessories"
> mswrd6.wpc
> mswrd8.wpc
> wordpad.exe
> write.wpc
>
> I'm guessing it may be a case sensitivity problem.  You could try
> prepending 'win:...' (a guestfish-specific hack for Windows) in front
> of the path, as described in the manual:
>
> http://libguestfs.org/guestfish.1.html#windows-paths
>
> For example:
>
>> <fs> ls "/program files/windows nt/accessories"
> libguestfs: error: ls0: opendir: /program files/windows nt/accessories: No such file or directory
>
>> <fs> ls "win:/program files/windows nt/accessories"
> mswrd6.wpc
> mswrd8.wpc
> wordpad.exe
> write.wpc
>
>> <fs> set-trace true
>> <fs> ls "win:/program files/windows nt/accessories"
> libguestfs: trace: case_sensitive_path "/program files/windows nt/accessories"
> libguestfs: trace: case_sensitive_path = "/Program Files/Windows NT/Accessories"
> libguestfs: trace: ls "/Program Files/Windows NT/Accessories"
> libguestfs: trace: ls0 "/Program Files/Windows NT/Accessories" "/tmp/libguestfse0H7nF/ls10"
> libguestfs: trace: ls0 = 0
> libguestfs: trace: ls = ["mswrd6.wpc", "mswrd8.wpc", "wordpad.exe", "write.wpc"]
> mswrd6.wpc
> mswrd8.wpc
> wordpad.exe
> write.wpc
>
> (notice the extra call to case_sensitive_path in the trace).

In "/Program Files" it works fine for me, too. I still can't access
"/Users/Owner/My Documents"

Aha!! I found the problem. In Windows 7, "My Documents" is a link
to "Documents".  Apparently guestfish can't follow links.  I can
list "/Users/Owner/Documents" just fine. The space was a red
herring -- I can list "/Users/Owner/Saved Games" just fine, too.

Thanks for the response. It got me looking at what was different
between the directories that worked and those that didn't.

-- 
Bob Nichols     "NOSPAM" is really part of my email address.
                 Do NOT delete it.




More information about the virt-tools-list mailing list