-
Notifications
You must be signed in to change notification settings - Fork 246
Ignore DS_Store files #18
Comments
I'm sorry, I don't quite understand, how does this break revisions? Any file not ending in .sql should be ignored by dbv.php, .DS_Store files aren't supposed to appear in the revision script listing. |
Here are the steps I done to create the bug:
Pic of DS_Store appearing: http://i.imgur.com/yxTsU.png |
Hmm, do you have the latest version? Because this shouldn't happen since 988d865. Please update to the latest version https://github.com/victorstanciu/dbv/tags and let me know if you still have this problem. |
yes I am using version 1.0.3. I had a look and it seems as if the _getRevisionFiles method in the DBV class is just looping around and returning every file in the specific revision folder. Line 353 needs to be changed from: if ($file->isFile()) { to the same as you have in the _getDiskSchema method: if ($file->isFile() && pathinfo($file->getFilename(), PATHINFO_EXTENSION) == 'sql') { I would submit a pull request but I don't have git installed on this computer. |
Oops, you're right, I forgot to add the check to that method too. I commited 6d00ee2 right now, you don't have to fork/pull request. Thank you for submitting the issue! |
Sadly when creating files OSX creates hidden .DS_Store by default. This breaks running revisions, the only fix is to delete the .DS_Store from the command line or enable view hidden files in finder and deleting it.
The text was updated successfully, but these errors were encountered: