Git Product home page Git Product logo

Comments (4)

jblindsay avatar jblindsay commented on June 14, 2024

@jfbourdon Thanks for spotting this problem. It results from a use of the 'replace' function to handle paired header/data files for raster formats rather than a proper file path handling solution. This is actually pretty widespread within the WhiteboxTools codebase and as such, until it is resolved, it's a best practice to ensure that file extensions do not appear in either the file name or path.

Note that WhiteboxTools is a completely independent codebase and a separate project from Whitebox GAT, which accounts for their different behaviour in this regard.

from whitebox-tools.

jfbourdon avatar jfbourdon commented on June 14, 2024

I would gladly try to correct the code, but I can't find in converter_raster_format.rs where this replace operation occur (the lines I found don't seem related to that). I don't have any Rust knowledge but I kind of understand what's going on. Is the replace operation somewhere else around line 174?

from whitebox-tools.

jfbourdon avatar jfbourdon commented on June 14, 2024

Just found where the magic is happening. I'll make a PR if I ever manage to get it to work!

from whitebox-tools.

jblindsay avatar jblindsay commented on June 14, 2024

Thanks @jfbourdon but because this has implications for several of the supported multi-file data formats, I've just finished refactoring each of the places in the codebase where replace was used to modify a file extension to now use the proper Path method in Rust. See the commit here. If you're becoming familiar with Rust, however, I'd certainly welcome any future commits that you may have for WhiteboxTools.

from whitebox-tools.

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.