wimh / SparkleShare

SparkleShare is a file sharing and collaboration tool inspired by Dropbox.
http://www.sparkleshare.org/
GNU General Public License v3.0
39 stars 6 forks source link

Continous git pushing when file is not readable #20

Closed kyak closed 12 years ago

kyak commented 13 years ago

Hello,

If there is some file in SparkleShare folder which cannot be read (the good example is temporary, or lock file from Microsoft Office: "~$My_Super_Presentation.pptx" or similar), then SparkleShare tries to git push indefinite times in a row:

11:15:47 [SyncUp][ss] Initiated 11:15:47 [Cmd] git add --all error: open("~$My_Super_Presentation.pptx"): Permission denied error: unable to index file ~$My_Super_Presentation.pptx fatal: adding files failed 11:15:47 [Git][ss] Changes staged 11:15:47 [Cmd] git status --porcelain 11:15:47 [Cmd] git commit -m "" --author="My Name my_mail@mymail.dom" 11:15:47 [Commit][ss] 11:15:47 [Cmd] git push origin master Everything up-to-date 11:15:52 [SyncUp][ss] Done 11:15:52 [Cmd] git rev-list --reverse HEAD 11:15:52 [Cmd] git log -1 --format=%H 11:15:52 [Listener] Not connected to tcp://204.62.14.135:1986/. Queuing message 11:15:52 [Cmd] git status --porcelain 11:15:52 [SyncUp][ss] Initiated

...and so on, it never stops until i close the presentation.

wimh commented 13 years ago

Related: #10

kyak commented 13 years ago

@wimh it is not quite clear why the problem still exists, if the branch that should have this fix is integrated into windows branch?

tvollstaedt commented 13 years ago

@kyak it seems you had your temporary file already existing while sparkleshare was closed. This case is not yet covered by the fix and will be done soon, thats also the reason why its not already merge into main repo.

kyak commented 13 years ago

@tvollstaedt nope, it's not the case.. I start sparkleshare (there is no locked file in place at that time). I then open a presentation within sparkleshare folder, and it starts continous pushing..

wimh commented 13 years ago

I don't know how powerpoint exactly handles temp files, but if ~$My_Super_Presentation.pptx was previously added to git successfully, you will get this error when the file becomes unreadable later.

To reproduce, add a file in the SparkleShare controlled directory. After it has been added, modify the properties, and deny read access to everybody. Now modify another file. The git add --all command will fail, because it cannot read the file.

This happens with or without tvollstaedt's patch.

kyak commented 13 years ago

There are no files like ~$My_Super_Presentation.pptx in the git repo whatsoever, so it wasn't added previously.

wimh commented 13 years ago

The git add --all fails. I think this might be a way to solve it:

hbons commented 13 years ago

@wimh sounds like the way to go. This way we also won't need the special code for the single case in OnFileActivity anymore

wimh commented 13 years ago

I have merged the change which add more ms office tempfiles to the ignore file, including ~*.pptx. (but these will not be added to existing folders). This should at least make it possible to use ms office with sparkleshare until a more permanent fix.

kyak commented 13 years ago

thanks. will give it a try as soon as i can.

wimh commented 12 years ago

Closing all open issues - there are too many changes upstream, won't merge any more.