mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-11685 CIFS: Emacs editor leaves data (dates and filenames) in bad state
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32357 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1885,10 +1885,10 @@ public class ContentDiskDriver2 extends AlfrescoDiskDriver implements ExtendedD
|
|||||||
// Check if the file is being marked for deletion, if so then check if the file is locked
|
// Check if the file is being marked for deletion, if so then check if the file is locked
|
||||||
if ( info.hasSetFlag(FileInfo.SetDeleteOnClose) && info.hasDeleteOnClose())
|
if ( info.hasSetFlag(FileInfo.SetDeleteOnClose) && info.hasDeleteOnClose())
|
||||||
{
|
{
|
||||||
if(logger.isDebugEnabled())
|
if(logger.isDebugEnabled())
|
||||||
{
|
{
|
||||||
logger.debug("Set Delete On Close for :" + name);
|
logger.debug("Set Delete On Close for :" + name);
|
||||||
}
|
}
|
||||||
// Check for delete permission
|
// Check for delete permission
|
||||||
if ( permissionService.hasPermission(nodeRef, PermissionService.DELETE) == AccessStatus.DENIED)
|
if ( permissionService.hasPermission(nodeRef, PermissionService.DELETE) == AccessStatus.DENIED)
|
||||||
{
|
{
|
||||||
@@ -1917,15 +1917,19 @@ public class ContentDiskDriver2 extends AlfrescoDiskDriver implements ExtendedD
|
|||||||
if ( isFolder == true && getCifsHelper().isFolderEmpty( nodeRef) == false)
|
if ( isFolder == true && getCifsHelper().isFolderEmpty( nodeRef) == false)
|
||||||
{
|
{
|
||||||
throw new DirectoryNotEmptyException( name);
|
throw new DirectoryNotEmptyException( name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( logger.isDebugEnabled())
|
|
||||||
{
|
|
||||||
logger.debug("Set deleteOnClose=true file=" + name);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(info.isHidden())
|
||||||
|
{
|
||||||
|
if ( logger.isDebugEnabled())
|
||||||
|
{
|
||||||
|
logger.debug("Set hidden attribute" + name);
|
||||||
|
}
|
||||||
|
// Not yet implemented
|
||||||
|
}
|
||||||
|
|
||||||
if( info.hasSetFlag(FileInfo.SetAllocationSize))
|
if( info.hasSetFlag(FileInfo.SetAllocationSize))
|
||||||
{
|
{
|
||||||
if ( logger.isDebugEnabled())
|
if ( logger.isDebugEnabled())
|
||||||
@@ -1943,17 +1947,17 @@ public class ContentDiskDriver2 extends AlfrescoDiskDriver implements ExtendedD
|
|||||||
// The NTProtocolHandler sets the deleteOnClose in both
|
// The NTProtocolHandler sets the deleteOnClose in both
|
||||||
// info and the NetworkFile - it's the one in NetworkFile that works.
|
// info and the NetworkFile - it's the one in NetworkFile that works.
|
||||||
|
|
||||||
if ( info.hasSetFlag(FileInfo.SetCreationDate))
|
if ( info.hasSetFlag(FileInfo.SetCreationDate) && info.hasCreationDateTime())
|
||||||
{
|
{
|
||||||
// Set the creation date on the file/folder node
|
// Set the creation date on the file/folder node
|
||||||
Date createDate = new Date( info.getCreationDateTime());
|
Date createDate = new Date(info.getCreationDateTime());
|
||||||
auditableProps.put(ContentModel.PROP_CREATED, createDate);
|
auditableProps.put(ContentModel.PROP_CREATED, createDate);
|
||||||
if ( logger.isDebugEnabled())
|
if ( logger.isDebugEnabled())
|
||||||
{
|
{
|
||||||
logger.debug("Set creation date" + name + ", " + createDate);
|
logger.debug("Set creation date" + name + ", " + createDate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( info.hasSetFlag(FileInfo.SetModifyDate))
|
if ( info.hasSetFlag(FileInfo.SetModifyDate) && info.hasModifyDateTime())
|
||||||
{
|
{
|
||||||
// Set the modification date on the file/folder node
|
// Set the modification date on the file/folder node
|
||||||
Date modifyDate = new Date( info.getModifyDateTime());
|
Date modifyDate = new Date( info.getModifyDateTime());
|
||||||
|
Reference in New Issue
Block a user