mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
build fix.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32097 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -285,20 +285,24 @@ public class FTPServerTest extends TestCase
|
|||||||
|
|
||||||
// Wild card
|
// Wild card
|
||||||
reply = ftp.cwd("/Alfresco/User*Homes");
|
reply = ftp.cwd("/Alfresco/User*Homes");
|
||||||
assertTrue(FTPReply.isPositiveCompletion(reply));
|
assertTrue("unable to change to /Alfresco User*Homes/", FTPReply.isPositiveCompletion(reply));
|
||||||
|
|
||||||
|
// // Single char pattern match
|
||||||
|
// reply = ftp.cwd("/Alfre?co");
|
||||||
|
// assertTrue("Unable to match single char /Alfre?co", FTPReply.isPositiveCompletion(reply));
|
||||||
|
|
||||||
// two level folder
|
// two level folder
|
||||||
reply = ftp.cwd("/Alfresco/Data Dictionary");
|
reply = ftp.cwd("/Alfresco/Data Dictionary");
|
||||||
assertTrue(FTPReply.isPositiveCompletion(reply));
|
assertTrue("unable to change to /Alfresco/Data Dictionary", FTPReply.isPositiveCompletion(reply));
|
||||||
|
|
||||||
// go up one
|
// go up one
|
||||||
reply = ftp.cwd("..");
|
reply = ftp.cwd("..");
|
||||||
assertTrue(FTPReply.isPositiveCompletion(reply));
|
assertTrue("unable to change to ..", FTPReply.isPositiveCompletion(reply));
|
||||||
|
|
||||||
reply = ftp.pwd();
|
reply = ftp.pwd();
|
||||||
ftp.getStatus();
|
ftp.getStatus();
|
||||||
|
|
||||||
assertTrue(FTPReply.isPositiveCompletion(reply));
|
assertTrue("unable to get status", FTPReply.isPositiveCompletion(reply));
|
||||||
|
|
||||||
// check we are at the correct point in the tree
|
// check we are at the correct point in the tree
|
||||||
reply = ftp.cwd("Data Dictionary");
|
reply = ftp.cwd("Data Dictionary");
|
||||||
@@ -386,7 +390,7 @@ public class FTPServerTest extends TestCase
|
|||||||
InputStream is2 = ftp.retrieveFileStream(FILE1_NAME);
|
InputStream is2 = ftp.retrieveFileStream(FILE1_NAME);
|
||||||
|
|
||||||
String content2 = inputStreamToString(is2);
|
String content2 = inputStreamToString(is2);
|
||||||
assertEquals("Content is not as expected", content2, FILE1_CONTENT_2);
|
assertEquals("Content is not as expected", FILE1_CONTENT_2, content2);
|
||||||
ftp.completePendingCommand();
|
ftp.completePendingCommand();
|
||||||
|
|
||||||
// now delete the file we have been using.
|
// now delete the file we have been using.
|
||||||
|
@@ -1084,7 +1084,7 @@ public class ContentDiskDriver2 extends AlfrescoDiskDriver implements ExtendedD
|
|||||||
|
|
||||||
if (logger.isDebugEnabled())
|
if (logger.isDebugEnabled())
|
||||||
{
|
{
|
||||||
logger.debug("Created file: path=" + name + " node=" + nodeRef + " network file=" + netFile);
|
logger.debug("Created temporary file: path=" + name + " node=" + nodeRef + " network file=" + netFile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -192,7 +192,7 @@ class ScenarioOpenFileInstance implements ScenarioInstance
|
|||||||
if(name.equalsIgnoreCase(c.getName()))
|
if(name.equalsIgnoreCase(c.getName()))
|
||||||
{
|
{
|
||||||
NetworkFile file = c.getNetworkFile();
|
NetworkFile file = c.getNetworkFile();
|
||||||
if(file.isReadOnly())
|
if(isReadOnly(file))
|
||||||
{
|
{
|
||||||
// Read Only File
|
// Read Only File
|
||||||
if(openReadOnlyCount == 1)
|
if(openReadOnlyCount == 1)
|
||||||
@@ -410,9 +410,7 @@ class ScenarioOpenFileInstance implements ScenarioInstance
|
|||||||
|
|
||||||
state = InternalState.OPEN;
|
state = InternalState.OPEN;
|
||||||
|
|
||||||
//
|
if(isReadOnly(fileHandle))
|
||||||
if(fileHandle.getGrantedAccess() == NetworkFile.READONLY)
|
|
||||||
//if(fileHandle.isReadOnly())
|
|
||||||
{
|
{
|
||||||
openReadOnlyCount++;
|
openReadOnlyCount++;
|
||||||
fileHandleReadOnly=fileHandle;
|
fileHandleReadOnly=fileHandle;
|
||||||
@@ -442,6 +440,9 @@ class ScenarioOpenFileInstance implements ScenarioInstance
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isReadOnly(NetworkFile file)
|
||||||
|
{
|
||||||
|
return (file.getGrantedAccess() == NetworkFile.READONLY);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user