Coder Social home page Coder Social logo

Ignore DS_Store files about dbv HOT 5 CLOSED

allistera avatar allistera commented on May 17, 2024
Ignore DS_Store files

from dbv.

Comments (5)

victorstanciu avatar victorstanciu commented on May 17, 2024

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.

from dbv.

allistera avatar allistera commented on May 17, 2024

Here are the steps I done to create the bug:

  • Create Folder 1
  • Create new file 'test.sql'
  • Opened DBV and expanded revision #1
  • Was unable to run selected revision (No errors returned) unless I manually deleted DS_Store

Pic of DS_Store appearing: http://i.imgur.com/yxTsU.png

from dbv.

victorstanciu avatar victorstanciu commented on May 17, 2024

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.

from dbv.

allistera avatar allistera commented on May 17, 2024

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.

from dbv.

victorstanciu avatar victorstanciu commented on May 17, 2024

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!

from dbv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.