Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [flux-dev] Status update

Hi!
Can you try to move file from outside into this directory, replacing original one?
For example: touch ../file; mv ../file file;
Also, you can try to move file from other partition, for example flash drive.
I had noticed, if I move files on the same partition, then I get MOVE_TO event; 
however on different partitions my original file is deleted, created new one, and content 
MOVE_TO case cannot be handled by flux, because resource already exists. I am trying to figure out how to fix this.
The first idea is to ignore if resource exists or not on node.js side as proposed in patch. What do you think?
Fjodor


2016-08-18 10:18 GMT+03:00 Martin Lippert <mlippert@xxxxxxxxx>:
Hey Fjodor,

not sure what exactly I should do, but here is what I did on my OS X machine:

- started your app, watching a directory
- edited a file in that directory and pressed save (in the text editor)

-> test.txt ENTRY_MODIFY

- copied a file with the same name into that directory and pressed “replace” in the dialog

-> test.txt ENTRY_MODIFY


Does that help?

Cheers,
-Martin



> Am 17.08.2016 um 14:12 schrieb Vershinin Fjodor <fjodor@xxxxxxxxxxxxx>:
>
> For example, when I edit file on my linux machine, gnome editor creates temporary file and on saving it moves temporary file replacing original one. From java fs watcher's perspective it looks like a new file was created with the same name. Flux cannot handle this.
> I think, this case can be handled using the same way, as flux handles changing existing files. What do you think?
> I just tried to reproduce this issue on different machines. On Windows machine, when I try replace file, I get this sequence:
> "ENTRY_DELETE
> ENTRY_CREATE
> ENTRY_MODIFY"
> On latest linux kernel I have the same behavior. On unbuntu LTS, I get "ENTRY_CREATE" only.
> So, it looks like kernel issue. Martin, could you have a look at Mac machine, if it is possible?
> <App.java>_______________________________________________
> flux-dev mailing list
> flux-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/flux-dev

_______________________________________________
flux-dev mailing list
flux-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/flux-dev



--
Thanks,
Fjodor
diff --git a/node.server/repository-message-api.js b/node.server/repository-message-api.js
index 5d8222b..19b0638 100644
--- a/node.server/repository-message-api.js
+++ b/node.server/repository-message-api.js
@@ -236,7 +236,7 @@ MessagesRepository.prototype.resourceCreated = function(data) {
 	var type = data.type;
 
 	this.repository.hasResource(username, projectName, resource, function(err, resourceExists) {
-		if (err === null && !resourceExists) {
+		if (err === null ) {
 			this.socket.emit('getResourceRequest', {
 				'callback_id' : 0,
 				'username' : username,

Back to the top