Fake oplocks for URL file opens to prevent Windows Explorer trying to use

byte range locking which causes an error dialog.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2250 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gary Spencer
2006-01-30 14:18:37 +00:00
parent a0bab2238c
commit 5ccf3681e9

View File

@@ -5678,9 +5678,21 @@ public class NTProtocolHandler extends CoreProtocolHandler
prms.reset(outPkt.getBuffer(), SMBSrvPacket.PARAMWORDS + 4); prms.reset(outPkt.getBuffer(), SMBSrvPacket.PARAMWORDS + 4);
// Fake the oplock for certain file types
boolean fakeOpLocks = false;
String fname = params.getPath().toUpperCase();
if ( fname.endsWith( ".URL")){
// Fake the oplock
fakeOpLocks = true;
}
// Check if oplocks should be faked // Check if oplocks should be faked
if (FakeOpLocks) if (fakeOpLocks == true)
{ {
// If an oplock was requested indicate it was granted, for now // If an oplock was requested indicate it was granted, for now