Commit graph

470 commits

Author SHA1 Message Date
abraunegg 79a9815183
Update makefiles.sh
* Add `#!/bin/bash` to shell script
2019-01-06 09:49:01 +11:00
abraunegg 84c69a5234
Update README.md
* Update help output to include --force-http-1.1
* Update to add note about curl compatibility and when to use --force-http-1.1
2019-01-06 08:19:02 +11:00
abraunegg 9d0c0aea39
Update bug_report.md 2019-01-06 07:49:00 +11:00
abraunegg 58541f73dc
Update bug_report.md 2019-01-06 07:23:12 +11:00
abraunegg 2e8bc828b6
Update bug_report.md 2019-01-06 07:20:02 +11:00
abraunegg 8d5ba88c38
Update lock.yml 2019-01-06 07:09:08 +11:00
abraunegg 7d6858d86a
Create lock.yml 2019-01-06 07:06:30 +11:00
abraunegg 1fa7e5f20c
Add extra debugging & http protocol downgrade (Issue #314) (#327)
* Add --force-http-1.1 flag to downgrade any HTTP/2 curl operations to HTTP 1.1 protocol
* Explicitly set all bool items to false at initialisation
* Update --display-config to display sync_list if configured
* Add debug handling to display when sync_list is loaded
* Add debug handling to output the handling of OneDrive changes
2019-01-06 05:43:44 +11:00
abraunegg ddc5d602da
Update sync.d (#329)
* Update HTTP 412 error notifications to better identify where 412 error is occuring
* Add a check for 'id' key on metadata update to prevent 'std.json.JSONException@std/json.d(494): Key not found: id' (Issue #325)
2019-01-06 05:35:55 +11:00
abraunegg 46ef8ed376 Revert "Update handling of HTTP 412 - Precondition Failed errors (#issue 325) (#326)"
This reverts commit 388cc1ded5.
2019-01-05 17:18:28 +11:00
abraunegg 388cc1ded5
Update handling of HTTP 412 - Precondition Failed errors (#issue 325) (#326)
* Update HTTP 412 - Precondition Failed messaging
* Add debug messaging when 5xx errors occur
* Update 5xx message to include
2019-01-05 07:57:10 +11:00
abraunegg bc059eaf0a
Update bug_report.md 2018-12-28 21:13:59 +11:00
abraunegg f14fbf22a7
Update release files for 2.2.4 (#322)
* Update release files for 2.2.4
2018-12-28 21:03:26 +11:00
Norbert Preining b9890ae2e5
better help output formatting (Issue #298) 2018-12-28 18:01:50 +09:00
Norbert Preining f7a50c0d97
update man page
- specify which options need arguments
- give top-level invocation synopsis
- add missing options
- sort options alphabetically
2018-12-28 13:56:17 +09:00
Norbert Preining fcf1ef2e1f
signal handling and database shutdown (#315)
Add a signal handler and shutdown database connection on SIGINT and SIGTERM
to make sure that .waf files are properly incorportated into the sqlite database.
2018-12-28 11:19:20 +09:00
abraunegg 2553366a89
Implement Feature Request: Add status command or switch (Issue #112) (#307)
* Implement Feature Request: Add status command or switch
2018-12-28 12:26:03 +11:00
abraunegg 7a6b507367
Update sync.d (#316)
* Update logic handling of --single-directory to prevent inadvertent local data loss
2018-12-28 11:57:32 +11:00
Norbert Preining 2ec6aa3df6
make sure sqlite checkpointing works by properly finalizing statements (#310)
If an sqlite statement is prepared and reused by using reset again and again, the connection
keeps a lock on the database, and checkpointing cannot ensure that transaction from the
wal file are carried over into the main database.

By preparing the statement every time it is used, the destructor calls finalize and thus
the lock is released.

Possible impacts during high frequency changes via monitor mode etc might arise.
2018-12-26 16:11:06 +09:00
abraunegg 5d388581b1
Resolve 'sync_dir' not read from 'config' file when run in Docker container #306 (#308)
* Fix logic for sync_dir handling on headless systems
* Fix logic where potentially a 'default' ~/OneDrive sync_dir could be set despite 'config' file configured for an alternate
* Add debug handling for sync_dir operations
* Add debug handling for homePath calculation
* Add debug handling for configDirBase calculation
* Reorder main() so that log.vdebug works where required
* Rework configDirName as this had the same issue as syncDir
* Update configDirName & syncDir '~' handling & replacement to be more robust and only replace if '~' is first char in string
* Add additional debug logging if syncDir is created
2018-12-23 11:15:10 +11:00
abraunegg 1060d85118
Resolve JSONException when supplying --get-O365-drive-id option with a string containing spaces (#305)
* JSONException when supplying --get-O365-drive-id option with a string containing spaces
2018-12-21 11:28:16 +11:00
abraunegg 0193f37fed
Update release files for 2.2.3 (#303)
* Update release files for 2.2.3
2018-12-20 17:45:42 +11:00
abraunegg 594bfcec54
Fix syncdir option is ignored (#302)
* Explicitly set value for syncdir if the option is passed in via CLI rather than 'config' file
2018-12-20 17:27:34 +11:00
abraunegg 37131ba697
Update release files for 2.2.2 (#300)
* Update release files for 2.2.2
2018-12-20 11:46:57 +11:00
abraunegg dfd3045ce4
Fix exception when missing parameter from usage option (#299)
* Handle the exception generated when an option is used which is expecting an input parameter but none is given
2018-12-20 11:05:32 +11:00
Norbert Preining 025a3b2878
check config file keys for validity (#296)
* check config file keys for validity, use setValue instead of direct access
* Update config.d
  Add 'drive_id' to be initialised, set to an empty string
* exit application if there is a configuration file error
* Issue #293 was caused by a spelling error in the configuration file. 
  If the configuration file has errors, we should not load it or run
  using the application defaults as this may have undesirable consequences
  for users data
* missed returning false on key issue
* Missed this edit of the file
2018-12-20 08:51:21 +09:00
abraunegg bbe672bff1
Update README.md
Add line break
2018-12-20 07:44:02 +11:00
abraunegg ddda7e0527
Update README.md
* Update readme to clarify using multiple OneDrive accounts and how to configure additional unit files for each individual OneDrive account
2018-12-20 07:42:13 +11:00
abraunegg 7d522583ef
Implement option --display-config (Issue #100) (#292)
* Implement --display-config to show the application configuration without actually performing a sync or application init
2018-12-20 05:42:28 +11:00
abraunegg 53df30810e check displayName rather than description (#290)
* In testing, 'description' and 'displayName' were the same, but in reality we are checking against the 'displayName' value as this is what we are asking the user to input, thus we need to check against displayName
2018-12-18 13:20:17 +09:00
Norbert Preining b46d3d62b1 fix activation of dmd (#285)
Currently the version of dmd is hard-coded, but has already
changed, and building docker images now fail. Re-using the install.sh
allows to get the install path and activation script.
2018-12-18 09:07:51 +11:00
Norbert Preining 91aaf91aa6 Reinitialize sync engine after three failed trials (#283)
* After extended suspend, or bad connection, the connection to OD might
go stale - thus no network connection to Microsoft OneDrive Service, skipping sync
and this continues ad infinitum. Change the last action to re-initialize the sync engine.
2018-12-13 07:08:18 +11:00
Norbert Preining 6a62406db7 Deal with deleted move targets (Issue: 273) (#278)
if the move target has been deleted before the monitor action completes,
the monitor action throws an exception when stat-ing the target for
mtime. Do not do anything in case the move target has disappeared
2018-12-08 05:02:47 +11:00
Norbert Preining 3608dcc4c2 Add very verbose (debug) mode by double -v -v (#279)
* Add very verbose (debug) mode by double -v -v - currently only used for debugging the inotify events
2018-12-08 05:01:22 +11:00
Norbert Preining 87cd18379d Deal with items that disappear during upload (Issue: #258) (#276)
* Deal with disappearing items during upload (Issue: #258)
2018-12-06 20:28:03 +11:00
Norbert Preining 06aa42f6d1 better log messages, less noise on temporary timeouts (#275)
* better log messages, less noise on temporary timeouts
2018-12-06 18:05:52 +11:00
abraunegg 0562c52492 Handle short lived files (Issue #273) (PR #274)
* Handle short lived files (Issue #273)
* Update README.md
* Add --disable-notifications to readme
2018-12-06 08:50:46 +09:00
Norbert Preining cc6cbf5ac7 Notification support via libnotify (#270)
* add external sources for (d)notify with README and license statements
* add new logAndNotify function, make building a compile time option
* use logAndNotify and main.d, make timeout message silent
* update documentation for notification support
* add command line switch --disable-notifications
* add build-deps for libnotify in README.md
2018-12-06 06:19:00 +11:00
abraunegg 487cfab8d1
update release files for 2.2.1 (#271)
* Update release files for 2.2.1
2018-12-04 13:29:43 +11:00
adudek 026809d4d1 Docker buildfiles for onedrive service (#262)
* Separate install options for binary (make install.noservice) only and binary
* Docker build files and usage documentation
2018-12-04 11:59:03 +11:00
Norbert Preining b10e641fe9 allow starting offline in monitor mode (#266)
* SyncEngine: allow for multiple calls to init by saving the state
* Factor out syncengine initialization code so that it can be reused
* Don't exit in monitor when started offline
* Always call initSyncEngine during regular syncs, this will call the SyncEngine init routine which caches the state, thus a quasi no-op.
* Add forgotten http.shutdown
2018-12-04 11:15:44 +11:00
abraunegg 29808c905c
Implement --get-O365-drive-id to get correct SharePoint Shared Library (Issue #248) (#260)
* Implement --get-O365-drive-id to return the correct drive_id of a SharePoint Shared Library to use for syncing that repository
2018-12-04 10:59:23 +11:00
Norbert Preining 56b63acede Make DOCDIR and MANDIR in the same way configurable as PREFIX etc 2018-12-04 08:40:05 +09:00
abraunegg 33dc260fd2
Update Makefile (#269)
Update Makefile based on 3a14a21cae

**Credit:** Zamir SUN sztsian@gmail.com
2018-12-04 07:28:16 +11:00
abraunegg cdb11326b9
Fix unreachable statements (#268)
* Add warning flag to compiler
* Fix unreachable statements

**Credit:** Zamir SUN <sztsian@gmail.com>
2018-12-04 06:29:18 +11:00
Norbert Preining 9817104ca1 continue in monitor mode when sync timed out (#265)
* update handling of connection timeouts in monitor mode & allow application continue rather than exit
2018-12-03 13:41:31 +11:00
Norbert Preining c24e4b0b1e adjust timeout values for libcurl (issue #256) (#261)
This change adjusts the two core timeout parameters of libcurl operation
- dataTimeout: changed from 3600sec to 300sec
  this timeout controls the max time when there is no data incoming
  (actually below CURLOPT_LOW_SPEED_LIMIT)
- operationTimeout: added 3600sec
  this timeout controls the maximally allowed connection timeout
2018-12-02 11:30:50 +11:00
Norbert Preining 90df7e4c9c Installation of doc files, addition of man page (#255)
* install documentation files into $PREFIX/share/doc/onedrive/
* add man page and install it, ignore generated version
* remove installed doc/man on uninstall
* remove generated man page on make clean
2018-12-02 07:41:01 +11:00
Norbert Preining 0d05274f32 Fix renaming of files sync issues (#252)
* issue #249 do not safeRename the target if it is in sync
* issue #249 only remove actual path if the associated ids agree
2018-11-29 21:31:44 +11:00
Norbert Preining 11138602ed gracefully handle connection errors in monitor mode (#253)
* gracefully handle connection errors, resolve issue #234
2018-11-29 20:48:24 +11:00