mirror of
https://github.com/abraunegg/onedrive
synced 2024-06-01 21:42:16 +02:00
Merge branch 'master' into Issue-#36
This commit is contained in:
commit
62ea1d994a
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,4 +2,5 @@
|
|||
onedrive
|
||||
onedrive.o
|
||||
onedrive.service
|
||||
onedrive@.service
|
||||
version
|
||||
|
|
2
Makefile
2
Makefile
|
@ -19,7 +19,7 @@ SOURCES = \
|
|||
all: onedrive onedrive.service
|
||||
|
||||
clean:
|
||||
rm -f onedrive onedrive.o onedrive.service
|
||||
rm -f onedrive onedrive.o onedrive.service onedrive@.service
|
||||
|
||||
install: all
|
||||
mkdir -p $(DESTDIR)/var/log/onedrive
|
||||
|
|
16
README.md
16
README.md
|
@ -27,14 +27,14 @@ sudo apt install libsqlite3-dev
|
|||
curl -fsS https://dlang.org/install.sh | bash -s dmd
|
||||
```
|
||||
|
||||
### Dependencies: Fedora < Version 18 / CentOS 6.x / RHEL 6.x
|
||||
### Dependencies: Fedora < Version 18 / CentOS / RHEL
|
||||
```sh
|
||||
sudo yum install libcurl-devel
|
||||
sudo yum install sqlite-devel
|
||||
curl -fsS https://dlang.org/install.sh | bash -s dmd
|
||||
```
|
||||
|
||||
### Dependencies: Fedora > Version 18 / CentOS 7.x / RHEL 7.x
|
||||
### Dependencies: Fedora > Version 18
|
||||
```sh
|
||||
sudo dnf install libcurl-devel
|
||||
sudo dnf install sqlite-devel
|
||||
|
@ -161,11 +161,23 @@ mkdir -p ~/.config/onedrive
|
|||
cp ./config ~/.config/onedrive/config
|
||||
nano ~/.config/onedrive/config
|
||||
```
|
||||
This file does not get created by default, and should only be created if you want to change the 'default' operational parameters.
|
||||
|
||||
Available options:
|
||||
* `sync_dir`: directory where the files will be synced
|
||||
* `skip_file`: any files or directories that match this pattern will be skipped during sync.
|
||||
|
||||
### sync_dir
|
||||
Example: `sync_dir="~/MyDirToSync"`
|
||||
|
||||
**Please Note:**
|
||||
Proceed with caution here by changing the default sync dir from ~/OneDrive to ~/MyDirToSync
|
||||
|
||||
The issue here is around how the client stores the sync_dir path in the database. If the config file is missing, or you don't use the `--syncdir` parameter - what will happen is the client will default back to `~/OneDrive` and '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.
|
||||
|
||||
### skip_file
|
||||
Example: `skip_file = ".*|~*|Desktop|Documents/OneNote*|Documents/IISExpress|Documents/SQL Server Management Studio|Documents/Visual Studio*|Documents/config.xlaunch|Documents/WindowsPowerShell"`
|
||||
|
||||
Patterns are case insensitive. `*` and `?` [wildcards characters](https://technet.microsoft.com/en-us/library/bb490639.aspx) are supported. Use `|` to separate multiple patterns.
|
||||
|
||||
Note: after changing `skip_file`, you must perform a full synchronization by executing `onedrive --resync`
|
||||
|
|
|
@ -118,7 +118,7 @@ int main(string[] args)
|
|||
cfg.init();
|
||||
|
||||
// command line parameters override the config
|
||||
if (syncDirName) cfg.setValue("sync_dir", syncDirName);
|
||||
if (syncDirName) cfg.setValue("sync_dir", syncDirName.expandTilde().absolutePath());
|
||||
|
||||
// upgrades
|
||||
if (exists(configDirName ~ "/items.db")) {
|
||||
|
|
|
@ -68,7 +68,7 @@ struct Database
|
|||
{
|
||||
int userVersion;
|
||||
extern (C) int callback(void* user_version, int count, char** column_text, char** column_name) {
|
||||
import core.stdc.stdlib;
|
||||
import core.stdc.stdlib: atoi;
|
||||
*(cast(int*) user_version) = atoi(*column_text);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -523,7 +523,9 @@ final class SyncEngine
|
|||
|
||||
// check if the item is going to be deleted
|
||||
if (isItemDeleted(driveItem)) {
|
||||
log.vlog("This item is marked for deletion:", item.name);
|
||||
// item.name is not available, so we get a bunch of meaningless log output
|
||||
// will fix this with wider logging changes being worked on
|
||||
//log.vlog("This item is marked for deletion:", item.name);
|
||||
if (cached) {
|
||||
// flag to delete
|
||||
idsToDelete ~= [item.driveId, item.id];
|
||||
|
|
Loading…
Reference in a new issue