REST API knowledge exchange
Post Reply
Mardock
Influencer
Posts: 23
Liked: never
Joined: Jul 10, 2014 3:40 pm
Contact:

Catolog query returns path with '\' instead of '/'

Post by Mardock »

Hi,

if I make this query /catalog/vms/{VMNAME}/vmRestorePoints/{ID}/guestfs/C:/Users/?action=listAll to get
all files and directory in C:/Users the xml response contains Path with '/' char

Code: Select all

<FileSystemEntries>
	<Files>
		<FileEntry>
			<Path>C:/Users/desktop.ini</Path>
		</FileEntry>
	</Files>
	<Directories>
		<DirectoryEntry>
			<Path>C:/Users/Administrator</Path>
		</DirectoryEntry>
	</Directories>
</FileSystemEntries>
If I query any other path of file system then the xml response contains Path with '/' char.

Only if I make this query /catalog/vms/{VMNAME}/vmRestorePoints/{ID}/guestfs/C:/?action=listAll to get
all files and directory in C: then the xml response contains Path with '\' char instead of '/' char.

Example:

Code: Select all

<FileSystemEntries>  
	<Files>
		<FileEntry>
			 <Path>C:\bootmgr</Path>
		</FileEntry>
	</Files>
	<Directories>
		<DirectoryEntry>
			<Path>C:\Users</Path>
		</DirectoryEntry>
	</Directories>
</FileSystemEntries>
Any idea?

Thanks,
Mardock.
veremin
Product Manager
Posts: 20413
Liked: 2301 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Catolog query returns path with '\' instead of '/'

Post by veremin »

That's by design and has to do with the way our catalog service forms paths. But does that cause any issues in your case? If so, what are those problems?

Thanks.
Mardock
Influencer
Posts: 23
Liked: never
Joined: Jul 10, 2014 3:40 pm
Contact:

Re: Catolog query returns path with '\' instead of '/'

Post by Mardock »

Hi,
if I show at the same time more path they have different separator char so they seem inconsistent.

I will replace the "\" with "/".

Thank you,
Mardock.
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests