Coder Social home page Coder Social logo

Comments (7)

yorukot avatar yorukot commented on July 20, 2024 1

I didn't notice the problem of config synchronization

Got it,next version will be changed

from superfile.

yorukot avatar yorukot commented on July 20, 2024 1

I think this can be close

  • Update log file from $XDG_CONFIG_HOME/superfile/data/superfile.log to $XDG_CACH_DATA #27
  • Update data folder from $XDG_CONFIG_HOME/superfile/data to $XDG_DATA_HOME/superfile 9fff97a
  • Update $HOME/.superfile to $XDG_CONFIG_HOME/superfile 886dbfb

from superfile.

yorukot avatar yorukot commented on July 20, 2024

$XDG_CONFIG_HOME seems just $HOME/.config
Ok i think i can will change it

and the trashFolder i need some time to Research what is that :(

from superfile.

yorukot avatar yorukot commented on July 20, 2024

Update will release in v1.0.1 886dbfb

from superfile.

guildem avatar guildem commented on July 20, 2024

To be sure that write I wrote in the commit appears for every issue reader, I copy it here :

--

HomeDir + "/.config/superfile" should be a backup folder only if $XDG_CONFIG_HOME doesn't exists.

To not access the env var directly you can use https://pkg.go.dev/github.com/rkoesters/xdg/basedir.

Don't forget to change the dataFolder to $XDG_DATA_HOME or the rkoesters/xdg/basedir equivalent (and backup folder).

from superfile.

yorukot avatar yorukot commented on July 20, 2024

ok i just fix in here

but i think i wont change the data folder because i think it's a bit unnecessary

from superfile.

guildem avatar guildem commented on July 20, 2024

The use case for a separate data folder is config synchronisation. I have a main host used to work daily, a laptop when I'm not at home, and a macmini for specific usage. I sync my config files between all of them.

Why would I need to sync logs and version check ? These are related to each host. The config folder is made for app configuration, and data/state folders are made to store the state of the app on the host. The last folder is cache, where we can delete files without changing application state or configuration because it will be rebuilt on the next start. It even can be cleaned on each reboot.

So config is dotfiles saved and shareable, state is fixed to one host, cache is volatile and deletable. That's the necessity of the data/state folders (set in $XDG_DATA_DIR or $XDG_STATE_DIR).

This is only an advice, easier to fix on early versions, but now it's you're decision.

from superfile.

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.