bjornbjorn / snippetssync.ee2_addon

Save snippets as files during development
http://wedoaddons.com
21 stars 8 forks source link

#4 : Deleting Files now works on a CP to Filesystem basis. #5

Closed jannisg closed 12 years ago

jannisg commented 12 years ago

Have a look at the solution that uses the individual snippet_id or variable_id to delete the source file from the filesystem folder.

I did some testing and everything seemed to work.

Obviously it's less of a "Purge directory" action since it only specifically deletes the file you delete.

Also it does not address the issue with direct DB manipulation, so if I delete a snippet from the DB manually (delete row) and the file still exists it will be written back into the DB on session_start (but that's how it's always been so shouldn't be too big a deal I hope).

What do you think?

PS: I messed up the commit history on my branch a little bit (git noob walking :( ) All that's actually been updated aside from version bumping to 1.0.4 is the snippetslib.php file.

bjornbjorn commented 12 years ago

Hi jannisg, sorry for the late reply, had a crazybusy week last week :-)

Anyway, I've tested your branch now and it seems to work excellent. I just pushed a commit with some changes to your branch, check it out:

https://github.com/bjornbjorn/snippetssync.ee2_addon/commit/18563b5e9ac7f90b72b6e1c5926cf47b0bcf1337

If we give a warning that the file will be deleted I think it's ok to have this feature enabled by default :)

jannisg commented 12 years ago

Nice, definitely nice to have it auto enabled I think!

And no worries at all about the late reply, I know exactly what it's like when you're super busy.