mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Fix for offline file support, AR-67.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2432 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -5687,7 +5687,7 @@ public class NTProtocolHandler extends CoreProtocolHandler
|
||||
|
||||
// Build the NT create andX response
|
||||
|
||||
outPkt.setParameterCount((flags & WinNT.ExtendedResponse) != 0 ? 42 : 34);
|
||||
outPkt.setParameterCount( 34);
|
||||
|
||||
outPkt.setAndXCommand(0xFF);
|
||||
outPkt.setParameter(1, 0); // AndX offset
|
||||
@@ -5696,7 +5696,7 @@ public class NTProtocolHandler extends CoreProtocolHandler
|
||||
|
||||
// Fake the oplock for certain file types
|
||||
|
||||
boolean fakeOpLocks = false;
|
||||
boolean fakeOpLocks = FakeOpLocks;
|
||||
String fname = params.getPath().toUpperCase();
|
||||
|
||||
if ( fname.endsWith( ".URL")){
|
||||
@@ -5778,7 +5778,7 @@ public class NTProtocolHandler extends CoreProtocolHandler
|
||||
prms.packLong(fileSize); // Allocation size
|
||||
prms.packLong(netFile.getFileSize()); // End of file
|
||||
prms.packWord(0); // File type - disk file
|
||||
prms.packWord(0); // Device state
|
||||
prms.packWord((flags & WinNT.ExtendedResponse) != 0 ? 7 : 0); // Device state
|
||||
prms.packByte(netFile.isDirectory() ? 1 : 0);
|
||||
|
||||
prms.packWord(0); // byte count = 0
|
||||
|
@@ -239,6 +239,7 @@ public class CifsHelper
|
||||
{
|
||||
long modified = DefaultTypeConverter.INSTANCE.longValue(modifiedDate);
|
||||
fileInfo.setModifyDateTime(modified);
|
||||
fileInfo.setAccessDateTime(modified);
|
||||
}
|
||||
// name
|
||||
String name = fileFolderInfo.getName();
|
||||
@@ -252,6 +253,11 @@ public class CifsHelper
|
||||
if ( permissionService.hasPermission(nodeRef, PermissionService.WRITE) == AccessStatus.DENIED)
|
||||
fileInfo.setFileAttributes(fileInfo.getFileAttributes() + FileAttribute.ReadOnly);
|
||||
|
||||
// Set the normal file attribute if no other attributes are set
|
||||
|
||||
if ( fileInfo.getFileAttributes() == 0)
|
||||
fileInfo.setFileAttributes(FileAttribute.NTNormal);
|
||||
|
||||
// Debug
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
|
Reference in New Issue
Block a user