Hello everybody,
i have implemented a small plugin which cares about my global assembly cache for dotnet assemblies.
The behavior on putting files into the cache (implemented via the FsPutFile method) is strange:
every time i'm tald that a file with given name and size of -1 exists and i'm asked if i want to overwrite existing file/skip/cancel/rename.
After it an ok/cancel dialog with title "error uploading file" appears, but my desired action is performed.
My implementation of the FsPutFile always returns FS_FILE_OK (0) value, that's why my question: why all the dialogs appear and how can i suppress them.
P.S.: I started my implementation with the samplefsplugin and there only changed needed methods and deleted not needed methods.
Thanks a lot in advance
Alexander
Strange behavoir on copying files into plugin's filesystem
Moderators: Hacker, petermad, Stefan2, white
- apowolozki
- Junior Member
- Posts: 7
- Joined: 2010-07-06, 10:05 UTC
- Location: Dortmund, Germany
- apowolozki
- Junior Member
- Posts: 7
- Joined: 2010-07-06, 10:05 UTC
- Location: Dortmund, Germany
- apowolozki
- Junior Member
- Posts: 7
- Joined: 2010-07-06, 10:05 UTC
- Location: Dortmund, Germany
Thanks a lot for your time spent for me, i just revised the code and have found the problem, it was my mistake.MVV wrote:AFAIK the only place where you can tell to TC that TC should display overwrite dialog - is to return FS_FILE_EXISTS in FsPutFile.
Maybe you can share your FsPutFile function for analyzing?
The implementation of my FsPutFile method is qute simpe:
Code: Select all
int __stdcall FsPutFileW(WCHAR* LocalName,WCHAR* RemoteName,int CopyFlags)
{
InstallAssembly(LocalName);
return FS_FILE_OK;
}
The mistake was in a previos implementation of the library which was:
Code: Select all
int __stdcall FsPutFileW(WCHAR* LocalName,WCHAR* RemoteName,int CopyFlags)
{
if(InstallAssembly(LocalName))
{
return FS_FILE_OK;
}
else
{
return FS_FILE_READERROR;
}
}
P.S. if somebody is interested to get the plugin, i will publish it maybe in a week or so, after additional regression tests and cleaning the code.
Alexander