RES: Copying a file but getting a directory

"Alexandre Da Silva Duarte" <[email protected]>
Newsgroups gmane.comp.jakarta.slide.user
Message-ID <[email protected]>
	Debugging I saw that the resourcetype property of the fileA.rtf
has the value "<collection/>". Thus, the if expression below returns
true (WebdavStoreAdapter.java), the file is deleted and a directory with
the same name of the file is created:

// in initialzation phase there might be no other way to tell
// this actually is a collection
// if it turns out to be so we need to revoke our decission and
// remove the resource and create a folder
// instead
if (tentativeResourceCreated.remove(uri.toString()) &&
revisionDescriptor.getResourceType().equals(NodeRevisionDescriptor.COLLE
CTION_TYPE)) {
	store.removeObject(uri.toString());
      store.createFolder(uri.toString());
}

	Does anyone have any ideas?


-----Mensagem original-----
De: Alexandre Da Silva Duarte [mailto:[email protected]] 
Enviada em: segunda-feira, 11 de setembro de 2006 10:25
Para: [email protected]
Assunto: Copying a file but getting a directory

Hi,

	I am running WCK and I am getting a strange behavior with the
copyMethod/moveMethod:

// just copying a file to another directory
res.setPath("/slide/files/directoryX/fileA.rtf");
boolean result = res.copyMethod("/slide/files/directoryY/fileA.rtf");

	But at the end of this execution I got a directory called
"fileA.rtf" instead a file.
	Someone knows what am I doing wrong?

Thanks in advance

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.