EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Working with HTTP / CbFsGetFileInfo issues

Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages
#33470
Posted: 05/28/2015 17:07:07
by Tim Sullivan (Standard support level)
Joined: 05/01/2008
Posts: 15

What I'm attempting to do seems simple enough...I'm trying to expose an http website as a directory. So, my website has 3 files accessible and I want to be able to perform a listing of those files. I was able to do this by referencing the files as part of the .htm page that is retrieved using the GET command and then parsed appropriately. That part works fine. I can get a listing of the files using a DOS command ( dir \\ap\folder ).

The problem I'm having is trying to perform the DOS command "type". When I execute [ type \\ap\folder\fileA.txt ], I end up getting the file contents displayed for both fileA.txt and fileB.txt. That seems strange since I didn't ask for fileB.txt. I further note that when trying [ type \\ap\folder\fileB.txt ], I end up getting the file contents displayed for both fileA.txt and fileB.txt -- in that order.

This must have something to do with the EnumerateDirectory since it is consistently performing this in the same order. It is always fileA.txt and then fileB.txt.

This is a debug listing of the events in the order that they happen just in case this is helpful.

CbFsOpenFile...: \
CbFsEnumerateDirectory...
HTTP EnumDir: fileA.txt
HTTP EnumDir: fileB.txt
CbFsGetFileInfo...: \fileA.txt
AFV_GetFileInfo_FNF...: \fileA.txt
FindHTTPFile...: \fileA.txt
GetWebResponse...: \fileA.txt
CbFsOpenFile...: \fileA.txt
AFV_PreOpenFile...: fileA.txt
GetWebResponse...: fileA.txt
CbFsGetFileInfo...: \fileA.txt
CbFsOpenFile...: \fileA.txt
CbFsEnumerateDirectory...
CbFsEnumerateDirectory...
CbFsGetFileInfo...: \fileB.txt
AFV_GetFileInfo_FNF...: \fileB.txt
FindHTTPFile...: \fileB.txt
GetWebResponse...: \fileB.txt
CbFsOpenFile...: \fileB.txt
AFV_PreOpenFile...: fileB.txt
GetWebResponse...: fileB.txt
CbFsCloseDirectoryEnumeration...

It seems like I'm getting an unexpected CbFsGetFileInfo with "fileB.txt" that is causing the issue.
Any ideas why this is happening or suggestions on what to look for?

Thanks.
#33471
Posted: 05/28/2015 23:47:12
by Eugene Mayevski (EldoS Corp.)

The file is opened by Explorer during directory enumeration in the attempt to scan its metadata. This is a common problem, discussed a lot in this forum.

Now why your data gets merged is up to you - you have implemented something not the way it is supposed to work, but I can't say what it was. Hopefully the above information will give you an idea.


Sincerely yours
Eugene Mayevski

Reply

Statistics

Topic viewed 1465 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!