Coder Social home page Coder Social logo

where is a default config? about onedrive HOT 8 CLOSED

abraunegg avatar abraunegg commented on July 22, 2024
where is a default config?

from onedrive.

Comments (8)

yn-coder avatar yn-coder commented on July 22, 2024

Same problem.

I've manually copy the config file from ~\onedrive to ~\.config\onedrive (this is a default place) - now working well.

Problem is onedrive doesn't create the config file in .config\onedrive\ after first start. May be bug?

from onedrive.

abraunegg avatar abraunegg commented on July 22, 2024

@karl-ruhigen, @yn-coder

The config file for the application resides in ~/.config/onedrive/ as a file called config

This file does not get created by default, and should only be created if you want to change the 'default' operational parameters.

Please Note:
Proceed with caution here by changing the default sync dir from ~/OneDrive to ~/library

The issue here is around how the client was originally coded & how the relative paths are stored in the database. If the config file is missing, or you don't use the sync_dir parameter - what will happen is the client will 'think' that either all your data has been deleted - thus delete the content on OneDrive, or will start downloading all data from OneDrive into the default location.

Now - with this being said:

To make your own configuration file to override the defaults:

vi ~/.config/onedrive/config

File contents:

sync_dir="~/library"

This should get you going in terms of setting the configuration for different sync location - however in testing this - it appears that it is not working as it should be, so looks like this is a bug when using the config file for the sync_dir option & when passing in the --syncdir from the command line.

Thanks for bringing this to my attention.

from onedrive.

abraunegg avatar abraunegg commented on July 22, 2024

Can you please test the following:

#55

git clone https://github.com/abraunegg/onedrive.git
cd onedrive
git fetch origin pull/55/head:pr55
git checkout pr55
make
make install

In testing here locally:

Loading config ...
Using Config Dir: /root/.config/onedrive
Initializing the OneDrive API ...
Opening the item database ...
All operations will be performed in: /root/library
Initializing the Synchronization Engine ...
Account Type: business
Default Drive ID: <redacted>
Default Root ID: <redacted>
Remaining Free Space: 1099372677600
Fetching details for OneDrive Root
OneDrive Root exists in the database
Applying changes of Path ID: <redacted>
Uploading differences of .
Processing root
The directory has not changed
Processing asdf.txt
The file has not changed
Uploading new items of .
Applying changes of Path ID: <redacted>

from onedrive.

yn-coder avatar yn-coder commented on July 22, 2024

I'll try to test it.

About config - I think you need to write it in docs. Thank you.

from onedrive.

abraunegg avatar abraunegg commented on July 22, 2024

Updated the readme file to clarify usage, warning and provide examples.

from onedrive.

abraunegg avatar abraunegg commented on July 22, 2024

@karl-ruhigen, @yn-coder
Any update in testing the fix for resolution to your issue?

from onedrive.

abraunegg avatar abraunegg commented on July 22, 2024

Closing this issue as validated externally, code change synced to master.

from onedrive.

lock avatar lock commented on July 22, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

from onedrive.

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.