Compare commits

...
Author SHA1 Message Date
kenneth@hexad.dk 266bd3e40a Tagged 1.3.4 release
git-svn-id: https://duplicati.googlecode.com/svn/tags/1.3.4@1514 59da171f-624f-0410-aa54-27559c288bec
2013-02-02 08:13:18 +00:00
kenneth@hexad.dk 276f7ab2d1 Merged r1507,r1508,r1509,r1510,r1511,r1512 into 1.3.x branch
This adds the "export to command line" feature, and the "read settings from file", and the "reset temp folder on settings restore" fixes.

git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1513 59da171f-624f-0410-aa54-27559c288bec
2013-01-31 13:40:33 +00:00
kenneth@hexad.dk fbe05c66d3 Merged r1505 into 1.3.x branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1506 59da171f-624f-0410-aa54-27559c288bec
2013-01-19 12:26:31 +00:00
kenneth@hexad.dk 0d48f798e4 Merged r1503 into 1.3.x branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1504 59da171f-624f-0410-aa54-27559c288bec
2013-01-19 12:03:38 +00:00
kenneth@hexad.dk df7ea6613c Merged r1501 into 1.3.x branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1502 59da171f-624f-0410-aa54-27559c288bec
2013-01-11 09:32:29 +00:00
kenneth@hexad.dk 4bb15241e5 Added Philip to acknowledgements
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1489 59da171f-624f-0410-aa54-27559c288bec
2012-12-08 12:15:47 +00:00
kenneth@hexad.dk 3146e2a4a8 Added Russian translation, thanks to Philip Torchinsky, Semonix IT Consulting
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1487 59da171f-624f-0410-aa54-27559c288bec
2012-12-08 12:07:05 +00:00
kenneth@hexad.dk d50952ec43 Applied patch from Albin.
Update issue #756
Status: Fixed

Applied patch, thanks!

git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1486 59da171f-624f-0410-aa54-27559c288bec
2012-11-27 10:19:37 +00:00
kenneth@hexad.dk cd5d5235a3 Fixed a bug with exclude-files-attributes, thanks to Franz-Peter for discovering it.
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1484 59da171f-624f-0410-aa54-27559c288bec
2012-11-27 09:52:53 +00:00
kenneth@hexad.dk 8fb7869464 Merged r1475 into 1.3.x branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1476 59da171f-624f-0410-aa54-27559c288bec
2012-11-17 12:28:31 +00:00
kenneth@hexad.dk cad4b2252f Update issue #731
Status: Fixed

Applied patch from issue #731

git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1469 59da171f-624f-0410-aa54-27559c288bec
2012-10-24 08:58:06 +00:00
kenneth@hexad.dk 2ebd822366 Update issue #719
Status: Fixed

Improved compatibility advanced options

git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1467 59da171f-624f-0410-aa54-27559c288bec
2012-10-13 10:12:31 +00:00
kenneth@hexad.dk 447b7abe77 Update issue #707
Status: Fixed

Added guard to catch and report offending filenames.

git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1465 59da171f-624f-0410-aa54-27559c288bec
2012-10-08 18:46:51 +00:00
kenneth@hexad.dk 68d77d7237 Update issue #710
Status: Fixed

Added some extra logic to guard against inconsistent file list and source folder list.

git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1464 59da171f-624f-0410-aa54-27559c288bec
2012-10-08 18:45:57 +00:00
kenneth@hexad.dk 541b6e0803 Merged r1461 into 1.3.x branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1462 59da171f-624f-0410-aa54-27559c288bec
2012-10-06 12:49:12 +00:00
kenneth@hexad.dk baba06dc23 Workaround for crash in tray icon when showing balloon notification.
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1452 59da171f-624f-0410-aa54-27559c288bec
2012-09-08 10:57:15 +00:00
kenneth@hexad.dk fcf9c932a3 Merged r1450 into 1.3.x branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1451 59da171f-624f-0410-aa54-27559c288bec
2012-09-08 10:43:16 +00:00
kenneth@hexad.dk 687a645b98 Merged r1441 into 1.3.x branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1442 59da171f-624f-0410-aa54-27559c288bec
2012-08-23 07:09:19 +00:00
kenneth@hexad.dk 59d8a052d9 Merged r1437 into 1.3.x branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1438 59da171f-624f-0410-aa54-27559c288bec
2012-08-22 09:50:13 +00:00
kenneth@hexad.dk f283f4b509 Merged r1433 into 1.3.x branch, including some new locations
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1434 59da171f-624f-0410-aa54-27559c288bec
2012-08-20 07:58:12 +00:00
kenneth@hexad.dk 2ffa6745c2 Added a bunch of ignores
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1431 59da171f-624f-0410-aa54-27559c288bec
2012-08-16 20:10:43 +00:00
kenneth@hexad.dk fd43243342 Fixed a missing Localizable flag
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1428 59da171f-624f-0410-aa54-27559c288bec
2012-08-16 20:00:52 +00:00
kenneth@hexad.dk 81b13e06ca Synced the translation files
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1416 59da171f-624f-0410-aa54-27559c288bec
2012-08-07 07:48:34 +00:00
kenneth@hexad.dk c67f44d145 Merged r1413 and r1414 into trunk.
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1415 59da171f-624f-0410-aa54-27559c288bec
2012-08-06 20:45:45 +00:00
kenneth@hexad.dk ed73bea40b Updated build script to automatically pull updated translations from GoogleDocs
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1396 59da171f-624f-0410-aa54-27559c288bec
2012-08-01 19:46:54 +00:00
kenneth@hexad.dk b83e8299f9 Added urls for translation CSV files in GoogleDocs
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1395 59da171f-624f-0410-aa54-27559c288bec
2012-08-01 19:46:21 +00:00
kenneth@hexad.dk 2ccd2fc894 Updated LocalizationTool.exe to support updating translations by pulling the CSV directly from Google Docs.
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1394 59da171f-624f-0410-aa54-27559c288bec
2012-08-01 19:45:40 +00:00
kenneth@hexad.dk 58769e6405 Update issue #676
Status: Fixes
Updated localization tool to use .Net 4.0

git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1393 59da171f-624f-0410-aa54-27559c288bec
2012-08-01 19:44:44 +00:00
kenneth@hexad.dk 5fe5b730b7 Updated donate link to force English language otherwise it defaults to Danish for some reason.
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1388 59da171f-624f-0410-aa54-27559c288bec
2012-07-31 19:39:09 +00:00
kenneth@hexad.dk cfc8f12ea2 Update issue #657
Status: Fixed

Merged in changes from CSV file

git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1387 59da171f-624f-0410-aa54-27559c288bec
2012-07-31 18:22:48 +00:00
kenneth@hexad.dk 37aa102c49 Merged r1381 into 1.3.x branch including some minor fixes.
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1386 59da171f-624f-0410-aa54-27559c288bec
2012-07-31 17:34:54 +00:00
kenneth@hexad.dk 54b00b151d Merged r1377 into 1.3.x branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1378 59da171f-624f-0410-aa54-27559c288bec
2012-07-28 10:05:09 +00:00
kenneth@hexad.dk 9caca15d66 Update issue #480
Status: Fixed

Changed to correctly encode filenames as UTF-8 in metadata files.

git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1358 59da171f-624f-0410-aa54-27559c288bec
2012-07-14 10:36:49 +00:00
kenneth@hexad.dk 53ffd4c591 Fixed a bug in the backport of r1343 to the 1.3.x branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1354 59da171f-624f-0410-aa54-27559c288bec
2012-07-02 18:11:03 +00:00
kenneth@hexad.dk e41f614d8c Backported r1343 to the 1.3.x branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1348 59da171f-624f-0410-aa54-27559c288bec
2012-06-29 20:03:12 +00:00
kenneth@hexad.dk cea35fc0ac Added output to the log file, even if the backend is never reached.
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1346 59da171f-624f-0410-aa54-27559c288bec
2012-06-29 19:34:06 +00:00
kenneth@hexad.dk 9a32c274d9 Update issue #648
Status: Fixed

Changed the warning log to use the actual filename instead of attempting to re-calculate it from the partial name.

git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1339 59da171f-624f-0410-aa54-27559c288bec
2012-06-26 14:18:48 +00:00
kenneth@hexad.dk 8b3343d60c Update issue #637
Status: Fixed

Changed the detection of the Google Docs "308 - Partial Upload" response to work better with Mono.

git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1335 59da171f-624f-0410-aa54-27559c288bec
2012-06-21 20:10:28 +00:00
kenneth@hexad.dk 9b7ebb61d6 Update issue #600
Status: Fixed

Applied patch from jenlehma

git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1324 59da171f-624f-0410-aa54-27559c288bec
2012-05-31 18:54:46 +00:00
kenneth@hexad.dk 1a9f8b7e21 Fixed line endings
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1314 59da171f-624f-0410-aa54-27559c288bec
2012-05-21 21:37:08 +00:00
kenneth@hexad.dk 670c855084 Updated SkyDrive to show warnings if the password is longer than 16 chars or contains special characters
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1313 59da171f-624f-0410-aa54-27559c288bec
2012-05-21 21:36:18 +00:00
kenneth@hexad.dk d34ff70146 Created the 1.3.x branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.x@1310 59da171f-624f-0410-aa54-27559c288bec
2012-05-21 19:41:00 +00:00
kenneth@hexad.dk a5807faba0 Changed the customized version number to not have historical version info.
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.2@1304 59da171f-624f-0410-aa54-27559c288bec
2012-05-21 18:49:09 +00:00
kenneth@hexad.dk 3f0647e83e Update issue #627
Status: Fixed

I changed the implementation so it uses Mono.Data.Sqlite if that is present,
and then fallback to System.Data.SQLite (calling libsqlite).

This fixes the crash on my setup, and I was able to complete a SSH based backup without issues on Ubuntu 12.04.

To prevent compatibility issues, it is possible to revert to the old way of just using
System.Data.SQLite by setting the environment variable "DISABLE_MONO_DATA_SQLITE".

git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.2@1302 59da171f-624f-0410-aa54-27559c288bec
2012-05-21 18:42:56 +00:00
kenneth@hexad.dk f03d765f7f Fixed a bug where deleted files were not correctly treated during partial restores.
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.2@1296 59da171f-624f-0410-aa54-27559c288bec
2012-05-17 08:04:24 +00:00
kenneth@hexad.dk ad48df833a Fixed a bug where Duplicati would make a backup of a non-existing folder and pretend it did not exist (i.e. all files are considered deleted).
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.2@1295 59da171f-624f-0410-aa54-27559c288bec
2012-05-17 08:02:21 +00:00
kenneth@hexad.dk 17745cf34c Merged r1289 into 1.3.2 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.2@1290 59da171f-624f-0410-aa54-27559c288bec
2012-05-14 21:42:56 +00:00
kenneth@hexad.dk e33df4964c Merged r1287 into 1.3.2 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.2@1288 59da171f-624f-0410-aa54-27559c288bec
2012-05-14 21:20:54 +00:00
kenneth@hexad.dk f1f4d8284f Merged r1285 into 1.3.2 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.2@1286 59da171f-624f-0410-aa54-27559c288bec
2012-05-14 21:13:56 +00:00
kenneth@hexad.dk 8aedccfb0a Merged r1283 into 1.3.2 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.2@1284 59da171f-624f-0410-aa54-27559c288bec
2012-05-14 21:09:58 +00:00
kenneth@hexad.dk 2b6268d382 Merged r1281 into 1.3.2 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.2@1282 59da171f-624f-0410-aa54-27559c288bec
2012-05-14 20:50:39 +00:00
kenneth@hexad.dk ba29eda43b Merged r1278 into 1.3.2 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.2@1279 59da171f-624f-0410-aa54-27559c288bec
2012-05-14 20:14:15 +00:00
kenneth@hexad.dk b75b2b4d76 Merged r1272 into 1.3.2 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.2@1277 59da171f-624f-0410-aa54-27559c288bec
2012-05-14 18:56:45 +00:00
kenneth@hexad.dk 3dc3e9d90c Fixed a cross-os linefeed issue
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.2@1267 59da171f-624f-0410-aa54-27559c288bec
2012-05-10 20:33:01 +00:00
kenneth@hexad.dk 1ce5804884 Merged r1248, and r1255:r1259 into 1.3.2 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.2@1261 59da171f-624f-0410-aa54-27559c288bec
2012-05-08 19:21:33 +00:00
kenneth@hexad.dk a5b039e62e Merged r1246 into 1.3.2 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.2@1247 59da171f-624f-0410-aa54-27559c288bec
2012-05-06 19:38:15 +00:00
kenneth@hexad.dk 223b5558fe Merged r1241 into 1.3.2 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.2@1242 59da171f-624f-0410-aa54-27559c288bec
2012-05-05 19:19:16 +00:00
kenneth@hexad.dk 7d546e8452 Merged r1219 into 1.3.2 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.2@1220 59da171f-624f-0410-aa54-27559c288bec
2012-04-30 18:40:03 +00:00
kenneth@hexad.dk 8477920496 Merged r1214 into 1.3.2 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.2@1218 59da171f-624f-0410-aa54-27559c288bec
2012-04-30 18:35:29 +00:00
kenneth@hexad.dk 73105587be Added 1.3.2 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.2@1215 59da171f-624f-0410-aa54-27559c288bec
2012-04-30 18:18:22 +00:00
kenneth@hexad.dk a7628566b6 Update issue #288
Checking of the updated/fixed French translation

git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1212 59da171f-624f-0410-aa54-27559c288bec
2012-04-27 17:14:52 +00:00
kenneth@hexad.dk 3f80700fb4 Fixed a minor issue with the LocalizationTool
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1211 59da171f-624f-0410-aa54-27559c288bec
2012-04-27 17:13:22 +00:00
kenneth@hexad.dk 244e502121 Merged r1208 and r1209 into 1.3.1 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1210 59da171f-624f-0410-aa54-27559c288bec
2012-04-21 21:24:39 +00:00
kenneth@hexad.dk 3fc896daa3 Updated version number, should fix it so it does not require a commit
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1205 59da171f-624f-0410-aa54-27559c288bec
2012-04-15 19:47:39 +00:00
kenneth@hexad.dk 7a466f937c Fixed that I committed the wrong translation files (they were empty)
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1204 59da171f-624f-0410-aa54-27559c288bec
2012-04-15 19:45:20 +00:00
kenneth@hexad.dk 04f1874080 Updated version number, should fix it so it does not require a commit
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1203 59da171f-624f-0410-aa54-27559c288bec
2012-04-13 21:00:08 +00:00
kenneth@hexad.dk 8c46d4c0bf Updated translations on 1.3.1 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1201 59da171f-624f-0410-aa54-27559c288bec
2012-04-13 20:53:52 +00:00
kenneth@hexad.dk d07c45dc62 Merged r1199 into 1.3.1 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1200 59da171f-624f-0410-aa54-27559c288bec
2012-04-11 19:42:52 +00:00
kenneth@hexad.dk 9c54afe136 Merged r1197 into 1.3.1 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1198 59da171f-624f-0410-aa54-27559c288bec
2012-04-09 18:40:48 +00:00
kenneth@hexad.dk 9cd14e0e61 Merged r1189, r1190, r1191 into 1.3.1 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1193 59da171f-624f-0410-aa54-27559c288bec
2012-03-29 05:55:41 +00:00
kenneth@hexad.dk fce00f1cc9 Merged r1182 into 1.3.1 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1183 59da171f-624f-0410-aa54-27559c288bec
2012-03-22 19:29:10 +00:00
kenneth@hexad.dk d3d1362d5b Improved error messages from the SharpSSH library
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1178 59da171f-624f-0410-aa54-27559c288bec
2012-03-21 19:40:47 +00:00
rstach@gmail.com a0bbedba5a Reworded and shortened a few strings in German localization.
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1177 59da171f-624f-0410-aa54-27559c288bec
2012-03-21 16:51:52 +00:00
kenneth@hexad.dk d5d27c5800 Rebuild of the LocalizationTool
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1175 59da171f-624f-0410-aa54-27559c288bec
2012-03-20 21:21:26 +00:00
kenneth@hexad.dk 66d855798b Merged r1173 into 1.3.1 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1174 59da171f-624f-0410-aa54-27559c288bec
2012-03-20 20:23:39 +00:00
kenneth@hexad.dk c66bf181f6 Merged r1169, r1170, r1171 into 1.3.1 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1172 59da171f-624f-0410-aa54-27559c288bec
2012-03-20 19:51:32 +00:00
kenneth@hexad.dk b63ec454b2 Merged r1166 into 1.3.1 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1167 59da171f-624f-0410-aa54-27559c288bec
2012-03-17 21:28:33 +00:00
kenneth@hexad.dk 58095c3fab Updated LocalizationTool.exe to work better on 64bit windows
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1164 59da171f-624f-0410-aa54-27559c288bec
2012-03-17 20:11:14 +00:00
kenneth@hexad.dk 75f3f15022 Merged r1162 to 1.3.1 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1163 59da171f-624f-0410-aa54-27559c288bec
2012-03-17 20:02:33 +00:00
kenneth@hexad.dk f6a7a74214 Merged r1159 and 1160 to 1.3.1 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1161 59da171f-624f-0410-aa54-27559c288bec
2012-03-17 19:49:49 +00:00
kenneth@hexad.dk 50558f116a Merged r1152 into 1.3.1 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1153 59da171f-624f-0410-aa54-27559c288bec
2012-02-29 10:52:17 +00:00
kenneth@hexad.dk 5cfe801e78 Merged r1150 into 1.3.1 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1151 59da171f-624f-0410-aa54-27559c288bec
2012-02-27 14:38:11 +00:00
birunthan.mohanathas 38f29f3877 Minor changes.
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1149 59da171f-624f-0410-aa54-27559c288bec
2012-02-24 13:44:54 +00:00
rstach@gmail.com 5a9492740e Added James Colton as contributor in acknowledgements.
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1147 59da171f-624f-0410-aa54-27559c288bec
2012-02-22 09:46:01 +00:00
kenneth@hexad.dk 9e9a80c23b Merged r1142 into 1.3.1 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1143 59da171f-624f-0410-aa54-27559c288bec
2012-02-21 10:29:30 +00:00
kenneth@hexad.dk a068521c23 Update issue #491
Status: Fixed

Updated default buffer size to 64kB for copying, gives drastically improved speed for FTP, and possibly all backends.


git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1140 59da171f-624f-0410-aa54-27559c288bec
2012-02-21 09:46:43 +00:00
kenneth@hexad.dk 073b755ef5 Updated 1.3.1 branch to not include Duplicati.Scheduler in the build, as it is only maintained in trunk
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1139 59da171f-624f-0410-aa54-27559c288bec
2012-02-21 09:28:21 +00:00
kenneth@hexad.dk 914e50b1dd Merged r1136 to 1.3.1 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1138 59da171f-624f-0410-aa54-27559c288bec
2012-02-20 20:37:19 +00:00
rstach@gmail.com 1ca1cb257c Set max port to 65535
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1134 59da171f-624f-0410-aa54-27559c288bec
2012-02-12 10:29:17 +00:00
rstach@gmail.com 893927306c Set max port to 65535
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1133 59da171f-624f-0410-aa54-27559c288bec
2012-02-12 10:28:49 +00:00
rstach@gmail.com f8d99f842d Set max port to 65535
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1132 59da171f-624f-0410-aa54-27559c288bec
2012-02-12 10:28:21 +00:00
rstach@gmail.com 3bf5a74a76 Set max port to 65535
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1131 59da171f-624f-0410-aa54-27559c288bec
2012-02-12 10:27:45 +00:00
kenneth@hexad.dk 324f6a85ea Merged r1123 to 1.3.1 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1124 59da171f-624f-0410-aa54-27559c288bec
2012-02-03 07:49:41 +00:00
kenneth@hexad.dk f0a49bc242 Updated 1.3.1 branch with fixes for Chinese translation, FTP backend and minor adjustments (r1117,r1118,r1119 and r1120)
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1122 59da171f-624f-0410-aa54-27559c288bec
2012-02-03 07:43:44 +00:00
rstach@gmail.com 5ed8856f01 Added Chinese translator "Born Kanas" to acknowledgements.
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1116 59da171f-624f-0410-aa54-27559c288bec
2012-02-03 07:27:14 +00:00
kenneth@hexad.dk 0feb65efbd Applied Chinese translation update r1114, to 1.3.1 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1115 59da171f-624f-0410-aa54-27559c288bec
2012-02-02 08:46:38 +00:00
kenneth@hexad.dk 7b314fc182 Merged FTP warning text from r1111 to 1.3.1 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1112 59da171f-624f-0410-aa54-27559c288bec
2012-01-29 16:40:08 +00:00
kenneth@hexad.dk 856f45dbf8 Merged Integer overflow changes r1109 to 1.3.1 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1110 59da171f-624f-0410-aa54-27559c288bec
2012-01-29 16:09:46 +00:00
kenneth@hexad.dk a466ea1ac0 Merged FTP changes r1105 and r1106 to 1.3.1 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1108 59da171f-624f-0410-aa54-27559c288bec
2012-01-19 19:28:01 +00:00
rstach@gmail.com 97eaa3295f Translation changes checked in over WebUI using copy&paste from CVS export opened with text editor on Windows
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1104 59da171f-624f-0410-aa54-27559c288bec
2012-01-18 12:00:04 +00:00
kenneth@hexad.dk d15ef2dcf9 Applied German translation update r1100
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1101 59da171f-624f-0410-aa54-27559c288bec
2012-01-16 08:05:11 +00:00
kenneth@hexad.dk 4caa9cc17a Applied backend logging option from r1098
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1099 59da171f-624f-0410-aa54-27559c288bec
2012-01-15 22:21:26 +00:00
kenneth@hexad.dk 79e17d6439 Applied updated translations (r1096) to 1.3.1 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1097 59da171f-624f-0410-aa54-27559c288bec
2012-01-12 09:46:08 +00:00
rstach@gmail.com fc98ffd6c7 Added Italian translator and sorted list alphabetically
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1090 59da171f-624f-0410-aa54-27559c288bec
2012-01-11 10:13:17 +00:00
kenneth@hexad.dk 88a2caae3b Applied updated translations (r1086 + r1087) to 1.3.1 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1088 59da171f-624f-0410-aa54-27559c288bec
2012-01-11 08:49:50 +00:00
kenneth@hexad.dk e8baf7e8b7 Applied patch from #529 (r1084) to 1.3.1 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1085 59da171f-624f-0410-aa54-27559c288bec
2012-01-10 08:41:29 +00:00
birunthan.mohanathas 4a5e66bb1b [1.3.1] Fixed Options dialog tab order.
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1082 59da171f-624f-0410-aa54-27559c288bec
2012-01-07 16:18:02 +00:00
birunthan.mohanathas b72721569c [1.3.1] Updated Options dialog UI.
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1081 59da171f-624f-0410-aa54-27559c288bec
2012-01-07 16:03:28 +00:00
kenneth@hexad.dk 98ce976c64 Applied patch from #523 (r1079) to 1.3.1 branch
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1080 59da171f-624f-0410-aa54-27559c288bec
2011-12-27 09:51:29 +00:00
rstach@gmail.com 0a7e0a3e13 Updated for 1.3.1.
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1075 59da171f-624f-0410-aa54-27559c288bec
2011-12-15 12:33:44 +00:00
kenneth@hexad.dk b0916a8d48 Created branch for 1.3.1
git-svn-id: https://duplicati.googlecode.com/svn/branches/1.3.1@1072 59da171f-624f-0410-aa54-27559c288bec
2011-12-15 09:37:03 +00:00
200 changed files with 21737 additions and 8140 deletions
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -13,7 +13,7 @@
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<PublishUrl>publish\</PublishUrl>
@@ -31,6 +31,7 @@
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -22,6 +22,8 @@ using System.Windows.Forms;
using System.Collections.Generic;
using System.Linq;
using System.Xml.Linq;
using System.IO;
using System.Net;
namespace LocalizationTool
{
@@ -97,6 +99,12 @@ namespace LocalizationTool
Report(loc);
new UpdateGUI(System.IO.Path.Combine(Application.StartupPath, "report." + loc + ".xml")).ShowDialog();
break;
case "webpull":
WebPull(loc, false);
break;
case "webupdate":
WebPull(loc, true);
break;
default:
PrintUsage();
return;
@@ -117,6 +125,8 @@ namespace LocalizationTool
Console.WriteLine("LocalizationTool.exe EXPORT [locale identifier]");
Console.WriteLine("LocalizationTool.exe IMPORT <locale identifier> <input CSV file>");
Console.WriteLine("LocalizationTool.exe EXPORTDIFF <locale identifier> <input CSV file>");
Console.WriteLine("LocalizationTool.exe WEBPULL [locale identifier]");
Console.WriteLine("LocalizationTool.exe WEBUPDATE [locale identifier]");
}
private struct CSVEntry
@@ -147,6 +157,79 @@ namespace LocalizationTool
}
}
private static bool IsValidCulture(string c)
{
try
{
System.Globalization.CultureInfo.GetCultureInfo(c);
return true;
}
catch
{
return false;
}
}
/// <summary>
/// Downloads updated CSV files from the web and generates diff files, and optionally updates the local CSV files
/// </summary>
/// <param name="loc">The culture to use</param>
/// <param name="update">True if the elements should be updated as well</param>
private static void WebPull(string loc, bool update)
{
var locs =
from n in Directory.GetFiles(Application.StartupPath, "report.*.url")
where IsValidCulture(Path.GetFileNameWithoutExtension(n).Substring("report.".Length))
select Path.GetFileNameWithoutExtension(n).Substring("report.".Length);
if (!string.IsNullOrEmpty(loc))
{
locs = locs.Where(c => string.Equals(c, loc, StringComparison.CurrentCultureIgnoreCase));
if (locs.Count() == 0)
{
Console.WriteLine("No URL file found for culture {0}", loc);
return;
}
}
if (locs.Count() == 0)
{
Console.WriteLine("No culture.url files found");
return;
}
foreach (var culture in locs)
{
var url = string.Format("report.{0}.url", culture);
var file = string.Format("report.{0}.new.csv", culture);
if (File.Exists(file))
File.Delete(file);
Console.Write("Downloading updated CSV for {0} ... ", culture);
try { new WebClient().DownloadFile(File.ReadAllText(url).Trim(), file); }
catch (Exception ex)
{
Console.WriteLine("Failed!");
Console.WriteLine(" -> {0}", ex.Message);
continue;
}
Console.WriteLine("Done!");
if (update)
{
Console.Write("Updating local files for {0} .", culture);
ExportDiff(culture, file);
Console.Write(".");
Import(culture, file);
Console.Write(".");
Export(culture);
Console.WriteLine(" Done!");
}
}
}
/// <summary>
/// Imports a CSV file into a dictionary format,
/// Outer key is filename, inner key is fieldname, inner value is translated text
@@ -216,7 +299,7 @@ namespace LocalizationTool
foreach (var item in sourceVals)
if (targetVals.ContainsKey(item.Key))
{
if (targetVals[item.Key].Element("value").Value != item.Value.Value)
if (targetVals[item.Key].Element("value").Value.Replace("\r\n", "\n") != item.Value.Value.Replace("\r\n", "\n"))
{
updated = true;
targetVals[item.Key].Element("value").Value = item.Value.Value;
@@ -487,7 +570,7 @@ namespace LocalizationTool
string path = f.Key;
if (f.Key.StartsWith(filenameprefix, Duplicati.Library.Utility.Utility.ClientFilenameStringComparision))
path = f.Key.Substring(pfl);
path = f.Key.Substring(Math.Min(pfl, f.Key.Length));
if (Duplicati.Library.Utility.Utility.IsClientLinux)
path = path.Replace(System.IO.Path.DirectorySeparatorChar.ToString(), "\\");
@@ -611,8 +694,8 @@ namespace LocalizationTool
}
//Filter the source and target before proceeding
sourceElements = sourceElements.Where(c => !ignores.ContainsKey(c.Element("value").Value.Trim().ToLower()) && !c.Element("value").Value.Trim().ToLower().StartsWith("..\\resources\\"));
targetElements = targetElements.Where(c => !ignores.ContainsKey(c.Element("value").Value.Trim().ToLower()) && !c.Element("value").Value.Trim().ToLower().StartsWith("..\\resources\\"));
sourceElements = sourceElements.Where(c => !ignores.ContainsKey(c.Element("value").Value.Trim().ToLower()) && !c.Element("value").Value.Trim().ToLower().StartsWith("..\\resources\\") && !c.Element("value").Value.Trim().ToLower().StartsWith("../resources/"));
targetElements = targetElements.Where(c => !ignores.ContainsKey(c.Element("value").Value.Trim().ToLower()) && !c.Element("value").Value.Trim().ToLower().StartsWith("..\\resources\\") && !c.Element("value").Value.Trim().ToLower().StartsWith("../resources/"));
var sourceVals = sourceElements.ToSafeDictionary(c => c.Attribute("name").Value, inf.SourceFile);
var targetVals = targetElements.ToSafeDictionary(c => c.Attribute("name").Value, inf.TargetFile);
@@ -634,6 +717,11 @@ namespace LocalizationTool
targetVals.ContainsKey(c.Key)
);
var yy = sourceVals.Values.Where(x => x.Value.Contains("System.Draw")).Concat(targetVals.Values.Where(x => x.Value.Contains("System.Draw")));
if (yy.Count() != 0)
{
}
reportRoot.Add(
new XElement("file",
new XAttribute("filename", inf.TargetFile),
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.237
// Runtime Version:4.0.30319.544
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.237
// Runtime Version:4.0.30319.544
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -50,17 +50,28 @@ namespace LocalizationTool
resgenexe = ExecuteAndRead("which", "resgen");
alexe = ExecuteAndRead("which", "al");
}
else
else //Windows
{
//Order of these paths is also the search order
string[] known_sdk_paths =
{
Environment.ExpandEnvironmentVariables("%WINDIR%\\Microsoft.Net\\Framework\\v2.0.50727\\"),
Environment.ExpandEnvironmentVariables("%PROGRAMFILES%\\Microsoft.NET\\SDK\\v2.0\\bin\\"),
Environment.ExpandEnvironmentVariables("%WINDIR%\\Microsoft.Net\\Framework\\v3.0\\"),
Environment.ExpandEnvironmentVariables("%WINDIR%\\Microsoft.Net\\Framework\\v4.0\\"),
Environment.ExpandEnvironmentVariables("%WINDIR%\\Microsoft.Net\\Framework\\v4.0.30319\\"),
Environment.ExpandEnvironmentVariables("%WINDIR%\\Microsoft.Net\\Framework\\v3.5\\"),
Environment.ExpandEnvironmentVariables("%PROGRAMFILES%\\Microsoft SDKs\\Windows\\v6.0A\\bin\\"),
Environment.ExpandEnvironmentVariables("%WINDIR%\\Microsoft.Net\\Framework\\v3.0\\"),
Environment.ExpandEnvironmentVariables("%WINDIR%\\Microsoft.Net\\Framework\\v2.0.50727\\"),
Environment.ExpandEnvironmentVariables("%PROGRAMFILES%\\Microsoft SDKs\\Windows\\v8.0A\\bin\\"),
Environment.ExpandEnvironmentVariables("%PROGRAMFILES%\\Microsoft SDKs\\Windows\\v7.1\\Bin\\NETFX 4.0 Tools\\"),
Environment.ExpandEnvironmentVariables("%PROGRAMFILES%\\Microsoft SDKs\\Windows\\v7.0A\\bin\\"),
Environment.ExpandEnvironmentVariables("%PROGRAMFILES%\\Microsoft SDKs\\Windows\\v8.0A\\bin\\")
Environment.ExpandEnvironmentVariables("%PROGRAMFILES%\\Microsoft SDKs\\Windows\\v6.0A\\bin\\"),
Environment.ExpandEnvironmentVariables("%PROGRAMFILES%\\Microsoft.NET\\SDK\\v2.0\\bin\\"),
Environment.ExpandEnvironmentVariables("%PROGRAMFILES(X86)%\\Microsoft SDKs\\Windows\\v8.0A\\bin\\"),
Environment.ExpandEnvironmentVariables("%PROGRAMFILES(X86)%\\Microsoft SDKs\\Windows\\v7.1\\Bin\\NETFX 4.0 Tools\\"),
Environment.ExpandEnvironmentVariables("%PROGRAMFILES(X86)%\\Microsoft SDKs\\Windows\\v7.0A\\bin\\"),
Environment.ExpandEnvironmentVariables("%PROGRAMFILES(X86)%\\Microsoft SDKs\\Windows\\v6.0A\\bin\\"),
Environment.ExpandEnvironmentVariables("%PROGRAMFILES(X86)%\\Microsoft.NET\\SDK\\v2.0\\bin\\"),
};
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0"?>
<configuration>
<configSections>
</configSections>
</configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
+6 -108
View File
@@ -55,19 +55,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Duplicati.Library.Backend.S
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Duplicati.Library.Backend.GoogleDocs", "Duplicati\Library\Backend\GoogleDocs\Duplicati.Library.Backend.GoogleDocs.csproj", "{42C91180-11EB-4590-82EA-80FE9D4DEBEC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Duplicati.Scheduler.Data", "Duplicati\Scheduler\Data\Duplicati.Scheduler.Data.csproj", "{C8F0DD19-E242-4E9C-A707-2FFADE8D7970}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Duplicati.Scheduler", "Duplicati\Scheduler\Duplicati.Scheduler.csproj", "{D1D503E8-5CF7-413B-81FB-403D65B43AAB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Duplicati.Scheduler.Utility", "Duplicati\Scheduler\Utility\Duplicati.Scheduler.Utility.csproj", "{0E3DF716-5657-4B51-9BF2-3791880930E1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Duplicati.Scheduler.RunBackup", "Duplicati\Scheduler\RunBackup\Duplicati.Scheduler.RunBackup.csproj", "{520FA2BD-1C59-40D9-BCB5-EDA11327B7F0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Duplicati.Scheduler.Monitor.SQL", "Duplicati\Scheduler\Monitor.SQL\Duplicati.Scheduler.Monitor.SQL.csproj", "{ECA674A3-CC59-4C75-90E3-5AACA591EC5D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectListView2010", "thirdparty\ObjectListView\ObjectListView\ObjectListView2010.csproj", "{18FEDA0C-D147-4286-B39A-01204808106A}"
EndProject
Global
GlobalSection(SubversionScc) = preSolution
Svn-Managed = True
Manager = AnkhSVN - Subversion Support for Visual Studio
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms
@@ -411,8 +403,8 @@ Global
{0CA86ECF-5BEC-4909-B4F6-110A03B30B92}.Debug|x86.Build.0 = Debug|x86
{0CA86ECF-5BEC-4909-B4F6-110A03B30B92}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0CA86ECF-5BEC-4909-B4F6-110A03B30B92}.Release|Any CPU.Build.0 = Release|Any CPU
{0CA86ECF-5BEC-4909-B4F6-110A03B30B92}.Release|Mixed Platforms.ActiveCfg = Release|x86
{0CA86ECF-5BEC-4909-B4F6-110A03B30B92}.Release|Mixed Platforms.Build.0 = Release|x86
{0CA86ECF-5BEC-4909-B4F6-110A03B30B92}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{0CA86ECF-5BEC-4909-B4F6-110A03B30B92}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{0CA86ECF-5BEC-4909-B4F6-110A03B30B92}.Release|x86.ActiveCfg = Release|x86
{0CA86ECF-5BEC-4909-B4F6-110A03B30B92}.Release|x86.Build.0 = Release|x86
{0CA86ECF-5BEC-4909-B4F6-110A03B30B92}.Test|Any CPU.ActiveCfg = Release|x86
@@ -535,102 +527,8 @@ Global
{42C91180-11EB-4590-82EA-80FE9D4DEBEC}.Test|Mixed Platforms.ActiveCfg = Release|Any CPU
{42C91180-11EB-4590-82EA-80FE9D4DEBEC}.Test|Mixed Platforms.Build.0 = Release|Any CPU
{42C91180-11EB-4590-82EA-80FE9D4DEBEC}.Test|x86.ActiveCfg = Release|Any CPU
{C8F0DD19-E242-4E9C-A707-2FFADE8D7970}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C8F0DD19-E242-4E9C-A707-2FFADE8D7970}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C8F0DD19-E242-4E9C-A707-2FFADE8D7970}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{C8F0DD19-E242-4E9C-A707-2FFADE8D7970}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{C8F0DD19-E242-4E9C-A707-2FFADE8D7970}.Debug|x86.ActiveCfg = Debug|Any CPU
{C8F0DD19-E242-4E9C-A707-2FFADE8D7970}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C8F0DD19-E242-4E9C-A707-2FFADE8D7970}.Release|Any CPU.Build.0 = Release|Any CPU
{C8F0DD19-E242-4E9C-A707-2FFADE8D7970}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{C8F0DD19-E242-4E9C-A707-2FFADE8D7970}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{C8F0DD19-E242-4E9C-A707-2FFADE8D7970}.Release|x86.ActiveCfg = Release|Any CPU
{C8F0DD19-E242-4E9C-A707-2FFADE8D7970}.Test|Any CPU.ActiveCfg = Release|Any CPU
{C8F0DD19-E242-4E9C-A707-2FFADE8D7970}.Test|Any CPU.Build.0 = Release|Any CPU
{C8F0DD19-E242-4E9C-A707-2FFADE8D7970}.Test|Mixed Platforms.ActiveCfg = Release|Any CPU
{C8F0DD19-E242-4E9C-A707-2FFADE8D7970}.Test|Mixed Platforms.Build.0 = Release|Any CPU
{C8F0DD19-E242-4E9C-A707-2FFADE8D7970}.Test|x86.ActiveCfg = Release|Any CPU
{D1D503E8-5CF7-413B-81FB-403D65B43AAB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D1D503E8-5CF7-413B-81FB-403D65B43AAB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D1D503E8-5CF7-413B-81FB-403D65B43AAB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{D1D503E8-5CF7-413B-81FB-403D65B43AAB}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{D1D503E8-5CF7-413B-81FB-403D65B43AAB}.Debug|x86.ActiveCfg = Debug|Any CPU
{D1D503E8-5CF7-413B-81FB-403D65B43AAB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D1D503E8-5CF7-413B-81FB-403D65B43AAB}.Release|Any CPU.Build.0 = Release|Any CPU
{D1D503E8-5CF7-413B-81FB-403D65B43AAB}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{D1D503E8-5CF7-413B-81FB-403D65B43AAB}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{D1D503E8-5CF7-413B-81FB-403D65B43AAB}.Release|x86.ActiveCfg = Release|Any CPU
{D1D503E8-5CF7-413B-81FB-403D65B43AAB}.Test|Any CPU.ActiveCfg = Release|Any CPU
{D1D503E8-5CF7-413B-81FB-403D65B43AAB}.Test|Any CPU.Build.0 = Release|Any CPU
{D1D503E8-5CF7-413B-81FB-403D65B43AAB}.Test|Mixed Platforms.ActiveCfg = Release|Any CPU
{D1D503E8-5CF7-413B-81FB-403D65B43AAB}.Test|Mixed Platforms.Build.0 = Release|Any CPU
{D1D503E8-5CF7-413B-81FB-403D65B43AAB}.Test|x86.ActiveCfg = Release|Any CPU
{0E3DF716-5657-4B51-9BF2-3791880930E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0E3DF716-5657-4B51-9BF2-3791880930E1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0E3DF716-5657-4B51-9BF2-3791880930E1}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{0E3DF716-5657-4B51-9BF2-3791880930E1}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{0E3DF716-5657-4B51-9BF2-3791880930E1}.Debug|x86.ActiveCfg = Debug|Any CPU
{0E3DF716-5657-4B51-9BF2-3791880930E1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0E3DF716-5657-4B51-9BF2-3791880930E1}.Release|Any CPU.Build.0 = Release|Any CPU
{0E3DF716-5657-4B51-9BF2-3791880930E1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{0E3DF716-5657-4B51-9BF2-3791880930E1}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{0E3DF716-5657-4B51-9BF2-3791880930E1}.Release|x86.ActiveCfg = Release|Any CPU
{0E3DF716-5657-4B51-9BF2-3791880930E1}.Test|Any CPU.ActiveCfg = Release|Any CPU
{0E3DF716-5657-4B51-9BF2-3791880930E1}.Test|Any CPU.Build.0 = Release|Any CPU
{0E3DF716-5657-4B51-9BF2-3791880930E1}.Test|Mixed Platforms.ActiveCfg = Release|Any CPU
{0E3DF716-5657-4B51-9BF2-3791880930E1}.Test|Mixed Platforms.Build.0 = Release|Any CPU
{0E3DF716-5657-4B51-9BF2-3791880930E1}.Test|x86.ActiveCfg = Release|Any CPU
{520FA2BD-1C59-40D9-BCB5-EDA11327B7F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{520FA2BD-1C59-40D9-BCB5-EDA11327B7F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{520FA2BD-1C59-40D9-BCB5-EDA11327B7F0}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{520FA2BD-1C59-40D9-BCB5-EDA11327B7F0}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{520FA2BD-1C59-40D9-BCB5-EDA11327B7F0}.Debug|x86.ActiveCfg = Debug|Any CPU
{520FA2BD-1C59-40D9-BCB5-EDA11327B7F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{520FA2BD-1C59-40D9-BCB5-EDA11327B7F0}.Release|Any CPU.Build.0 = Release|Any CPU
{520FA2BD-1C59-40D9-BCB5-EDA11327B7F0}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{520FA2BD-1C59-40D9-BCB5-EDA11327B7F0}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{520FA2BD-1C59-40D9-BCB5-EDA11327B7F0}.Release|x86.ActiveCfg = Release|Any CPU
{520FA2BD-1C59-40D9-BCB5-EDA11327B7F0}.Test|Any CPU.ActiveCfg = Release|Any CPU
{520FA2BD-1C59-40D9-BCB5-EDA11327B7F0}.Test|Any CPU.Build.0 = Release|Any CPU
{520FA2BD-1C59-40D9-BCB5-EDA11327B7F0}.Test|Mixed Platforms.ActiveCfg = Release|Any CPU
{520FA2BD-1C59-40D9-BCB5-EDA11327B7F0}.Test|Mixed Platforms.Build.0 = Release|Any CPU
{520FA2BD-1C59-40D9-BCB5-EDA11327B7F0}.Test|x86.ActiveCfg = Release|Any CPU
{ECA674A3-CC59-4C75-90E3-5AACA591EC5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ECA674A3-CC59-4C75-90E3-5AACA591EC5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ECA674A3-CC59-4C75-90E3-5AACA591EC5D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{ECA674A3-CC59-4C75-90E3-5AACA591EC5D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{ECA674A3-CC59-4C75-90E3-5AACA591EC5D}.Debug|x86.ActiveCfg = Debug|Any CPU
{ECA674A3-CC59-4C75-90E3-5AACA591EC5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ECA674A3-CC59-4C75-90E3-5AACA591EC5D}.Release|Any CPU.Build.0 = Release|Any CPU
{ECA674A3-CC59-4C75-90E3-5AACA591EC5D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{ECA674A3-CC59-4C75-90E3-5AACA591EC5D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{ECA674A3-CC59-4C75-90E3-5AACA591EC5D}.Release|x86.ActiveCfg = Release|Any CPU
{ECA674A3-CC59-4C75-90E3-5AACA591EC5D}.Test|Any CPU.ActiveCfg = Release|Any CPU
{ECA674A3-CC59-4C75-90E3-5AACA591EC5D}.Test|Any CPU.Build.0 = Release|Any CPU
{ECA674A3-CC59-4C75-90E3-5AACA591EC5D}.Test|Mixed Platforms.ActiveCfg = Release|Any CPU
{ECA674A3-CC59-4C75-90E3-5AACA591EC5D}.Test|Mixed Platforms.Build.0 = Release|Any CPU
{ECA674A3-CC59-4C75-90E3-5AACA591EC5D}.Test|x86.ActiveCfg = Release|Any CPU
{18FEDA0C-D147-4286-B39A-01204808106A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{18FEDA0C-D147-4286-B39A-01204808106A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{18FEDA0C-D147-4286-B39A-01204808106A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{18FEDA0C-D147-4286-B39A-01204808106A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{18FEDA0C-D147-4286-B39A-01204808106A}.Debug|x86.ActiveCfg = Debug|Any CPU
{18FEDA0C-D147-4286-B39A-01204808106A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{18FEDA0C-D147-4286-B39A-01204808106A}.Release|Any CPU.Build.0 = Release|Any CPU
{18FEDA0C-D147-4286-B39A-01204808106A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{18FEDA0C-D147-4286-B39A-01204808106A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{18FEDA0C-D147-4286-B39A-01204808106A}.Release|x86.ActiveCfg = Release|Any CPU
{18FEDA0C-D147-4286-B39A-01204808106A}.Test|Any CPU.ActiveCfg = Release|Any CPU
{18FEDA0C-D147-4286-B39A-01204808106A}.Test|Any CPU.Build.0 = Release|Any CPU
{18FEDA0C-D147-4286-B39A-01204808106A}.Test|Mixed Platforms.ActiveCfg = Release|Any CPU
{18FEDA0C-D147-4286-B39A-01204808106A}.Test|Mixed Platforms.Build.0 = Release|Any CPU
{18FEDA0C-D147-4286-B39A-01204808106A}.Test|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(SubversionScc) = preSolution
Svn-Managed = True
Manager = AnkhSVN - Subversion Support for Visual Studio
EndGlobalSection
EndGlobal
+205 -178
View File
@@ -118,204 +118,231 @@ namespace Duplicati.CommandLine.BackendTester
return false;
}
List<Library.Interface.IFileEntry> curlist = null;
string disabledModulesValue;
string enabledModulesValue;
options.TryGetValue("enable-module", out enabledModulesValue);
options.TryGetValue("disable-module", out disabledModulesValue);
string[] enabledModules = enabledModulesValue == null ? new string[0] : enabledModulesValue.Trim().ToLower().Split(',');
string[] disabledModules = disabledModulesValue == null ? new string[0] : disabledModulesValue.Trim().ToLower().Split(',');
List<Library.Interface.IGenericModule> loadedModules = new List<IGenericModule>();
foreach (Library.Interface.IGenericModule m in Library.DynamicLoader.GenericLoader.Modules)
if (Array.IndexOf<string>(disabledModules, m.Key.ToLower()) < 0 && (m.LoadAsDefault || Array.IndexOf<string>(enabledModules, m.Key.ToLower()) >= 0))
{
m.Configure(options);
loadedModules.Add(m);
}
try
{
curlist = backend.List();
}
catch (FolderMissingException fex)
{
if (autoCreateFolders)
List<Library.Interface.IFileEntry> curlist = null;
try
{
try
{
if (backend is IBackend_v2)
((IBackend_v2)backend).CreateFolder();
curlist = backend.List();
}
catch { }
curlist = backend.List();
}
if (curlist == null)
throw fex;
}
foreach (Library.Interface.IFileEntry fe in curlist)
if (!fe.IsFolder)
catch (FolderMissingException fex)
{
if (Library.Utility.Utility.ParseBoolOption(options, "auto-clean") && first)
if (Library.Utility.Utility.ParseBoolOption(options, "force"))
{
Console.WriteLine("Auto clean, removing file: {0}", fe.Name);
backend.Delete(fe.Name);
continue;
}
else
Console.WriteLine("Specify the --force flag to actually delete files");
Console.WriteLine("*** Remote folder is not empty, aborting");
return false;
}
int number_of_files = 10;
int min_file_size = 1024;
int max_file_size = 1024 * 1024 * 50;
int min_filename_size = 5;
int max_filename_size = 80;
bool disableStreaming = Library.Utility.Utility.ParseBoolOption(options, "disable-streaming-transfers");
bool skipOverwriteTest = Library.Utility.Utility.ParseBoolOption(options, "skip-overwrite-test");
if (options.ContainsKey("number-of-files"))
number_of_files = int.Parse(options["number-of-files"]);
if (options.ContainsKey("min-file-size"))
min_file_size = (int)Duplicati.Library.Utility.Sizeparser.ParseSize(options["min-file-size"], "mb");
if (options.ContainsKey("max-file-size"))
max_file_size = (int)Duplicati.Library.Utility.Sizeparser.ParseSize(options["max-file-size"]);
if (options.ContainsKey("min-filename-length"))
min_filename_size = int.Parse(options["min-filename-length"]);
if (options.ContainsKey("max-filename-length"))
max_filename_size = int.Parse(options["max-filename-length"]);
Random rnd = new Random();
System.Security.Cryptography.SHA256 sha = System.Security.Cryptography.SHA256.Create();
//Create random files
using (Library.Utility.TempFolder tf = new Duplicati.Library.Utility.TempFolder())
{
List<TempFile> files = new List<TempFile>();
for (int i = 0; i < number_of_files; i++)
{
StringBuilder filename = new StringBuilder();
int filenamelen = rnd.Next(min_filename_size, max_filename_size);
for (int j = 0; j < filenamelen; j++)
filename.Append(allowedChars[rnd.Next(0, allowedChars.Length)]);
string localfilename = CreateRandomFile(tf, i, min_file_size, max_file_size, rnd);
//Calculate local hash and length
using (System.IO.FileStream fs = new System.IO.FileStream(localfilename, System.IO.FileMode.Open, System.IO.FileAccess.Read))
files.Add(new TempFile(filename.ToString(), localfilename, sha.ComputeHash(fs), fs.Length));
}
byte[] dummyFileHash = null;
if (!skipOverwriteTest)
{
Console.WriteLine("Uploading wrong files ...");
using (Library.Utility.TempFile dummy = new Library.Utility.TempFile(CreateRandomFile(tf, files.Count, 1024, 2048, rnd)))
if (autoCreateFolders)
{
using (System.IO.FileStream fs = new System.IO.FileStream(dummy, System.IO.FileMode.Open, System.IO.FileAccess.Read))
dummyFileHash = sha.ComputeHash(fs);
//Upload a dummy file for entry 0 and the last one, they will be replaced by the real files afterwards
//We upload entry 0 twice just to try to freak any internal cache list
Uploadfile(dummy, 0, files[0].remotefilename, backend, disableStreaming);
Uploadfile(dummy, 0, files[0].remotefilename, backend, disableStreaming);
Uploadfile(dummy, files.Count - 1, files[files.Count - 1].remotefilename, backend, disableStreaming);
}
}
Console.WriteLine("Uploading files ...");
for (int i = 0; i < files.Count; i++)
Uploadfile(files[i].localfilename, i, files[i].remotefilename, backend, disableStreaming);
Console.WriteLine("Verifying file list ...");
curlist = backend.List();
foreach (Library.Interface.IFileEntry fe in curlist)
if (!fe.IsFolder)
{
bool found = false;
foreach (TempFile tx in files)
if (tx.remotefilename == fe.Name)
{
if (tx.found)
Console.WriteLine("*** File with name {0} was found more than once", tx.remotefilename);
found = true;
tx.found = true;
if (fe.Size > 0 && tx.length != fe.Size)
Console.WriteLine("*** File with name {0} has size {1} but the size was reported as {2}", tx.remotefilename, tx.length, fe.Size);
break;
}
if (!found)
Console.WriteLine("*** File with name {0} was found on server but not uploaded!", fe.Name);
}
foreach (TempFile tx in files)
if (!tx.found)
Console.WriteLine("*** File with name {0} was uploaded but not found afterwards", tx.remotefilename);
Console.WriteLine("Downloading files");
for(int i = 0; i < files.Count; i++)
{
using (Duplicati.Library.Utility.TempFile cf = new Duplicati.Library.Utility.TempFile())
{
Exception e = null;
Console.Write("Downloading file {0} ... ", i);
try
{
if (backend is Library.Interface.IStreamingBackend && !disableStreaming)
{
using (System.IO.FileStream fs = new System.IO.FileStream(cf, System.IO.FileMode.Create, System.IO.FileAccess.Write, System.IO.FileShare.None))
using (NonSeekableStream nss = new NonSeekableStream(fs))
(backend as Library.Interface.IStreamingBackend).Get(files[i].remotefilename, nss);
}
else
backend.Get(files[i].remotefilename, cf);
if (backend is IBackend_v2)
((IBackend_v2)backend).CreateFolder();
e = null;
curlist = backend.List();
}
catch (Exception ex)
catch (Exception ex)
{
e = ex;
Console.WriteLine("Autocreate folder failed with message: " + ex.Message);
}
if (e != null)
Console.WriteLine("failed\n*** Error: {0}", e.ToString());
else
Console.WriteLine("done");
Console.Write("Checking hash ... ");
using (System.IO.FileStream fs = new System.IO.FileStream(cf, System.IO.FileMode.Open, System.IO.FileAccess.Read))
if (Convert.ToBase64String(sha.ComputeHash(fs)) != Convert.ToBase64String(files[i].hash))
{
if (dummyFileHash != null && Convert.ToBase64String(sha.ComputeHash(fs)) == Convert.ToBase64String(dummyFileHash))
Console.WriteLine("failed\n*** Downloaded file was the dummy file");
else
Console.WriteLine("failed\n*** Downloaded file was corrupt");
}
else
Console.WriteLine("done");
}
if (curlist == null)
throw fex;
}
Console.WriteLine("Deleting files...");
foreach (TempFile tx in files)
try { backend.Delete(tx.remotefilename); }
catch (Exception ex)
{
Console.WriteLine("*** Failed to delete file {0}, message: {1}", tx.remotefilename, ex.ToString());
}
curlist = backend.List();
foreach (Library.Interface.IFileEntry fe in curlist)
if (!fe.IsFolder)
{
Console.WriteLine("*** Remote folder contains {0} after cleanup", fe.Name);
if (Library.Utility.Utility.ParseBoolOption(options, "auto-clean") && first)
if (Library.Utility.Utility.ParseBoolOption(options, "force"))
{
Console.WriteLine("Auto clean, removing file: {0}", fe.Name);
backend.Delete(fe.Name);
continue;
}
else
Console.WriteLine("Specify the --force flag to actually delete files");
Console.WriteLine("*** Remote folder is not empty, aborting");
return false;
}
int number_of_files = 10;
int min_file_size = 1024;
int max_file_size = 1024 * 1024 * 50;
int min_filename_size = 5;
int max_filename_size = 80;
bool disableStreaming = Library.Utility.Utility.ParseBoolOption(options, "disable-streaming-transfers");
bool skipOverwriteTest = Library.Utility.Utility.ParseBoolOption(options, "skip-overwrite-test");
if (options.ContainsKey("number-of-files"))
number_of_files = int.Parse(options["number-of-files"]);
if (options.ContainsKey("min-file-size"))
min_file_size = (int)Duplicati.Library.Utility.Sizeparser.ParseSize(options["min-file-size"], "mb");
if (options.ContainsKey("max-file-size"))
max_file_size = (int)Duplicati.Library.Utility.Sizeparser.ParseSize(options["max-file-size"]);
if (options.ContainsKey("min-filename-length"))
min_filename_size = int.Parse(options["min-filename-length"]);
if (options.ContainsKey("max-filename-length"))
max_filename_size = int.Parse(options["max-filename-length"]);
Random rnd = new Random();
System.Security.Cryptography.SHA256 sha = System.Security.Cryptography.SHA256.Create();
//Create random files
using (Library.Utility.TempFolder tf = new Duplicati.Library.Utility.TempFolder())
{
List<TempFile> files = new List<TempFile>();
for (int i = 0; i < number_of_files; i++)
{
StringBuilder filename = new StringBuilder();
int filenamelen = rnd.Next(min_filename_size, max_filename_size);
for (int j = 0; j < filenamelen; j++)
filename.Append(allowedChars[rnd.Next(0, allowedChars.Length)]);
string localfilename = CreateRandomFile(tf, i, min_file_size, max_file_size, rnd);
//Calculate local hash and length
using (System.IO.FileStream fs = new System.IO.FileStream(localfilename, System.IO.FileMode.Open, System.IO.FileAccess.Read))
files.Add(new TempFile(filename.ToString(), localfilename, sha.ComputeHash(fs), fs.Length));
}
byte[] dummyFileHash = null;
if (!skipOverwriteTest)
{
Console.WriteLine("Uploading wrong files ...");
using (Library.Utility.TempFile dummy = new Library.Utility.TempFile(CreateRandomFile(tf, files.Count, 1024, 2048, rnd)))
{
using (System.IO.FileStream fs = new System.IO.FileStream(dummy, System.IO.FileMode.Open, System.IO.FileAccess.Read))
dummyFileHash = sha.ComputeHash(fs);
//Upload a dummy file for entry 0 and the last one, they will be replaced by the real files afterwards
//We upload entry 0 twice just to try to freak any internal cache list
Uploadfile(dummy, 0, files[0].remotefilename, backend, disableStreaming);
Uploadfile(dummy, 0, files[0].remotefilename, backend, disableStreaming);
Uploadfile(dummy, files.Count - 1, files[files.Count - 1].remotefilename, backend, disableStreaming);
}
}
Console.WriteLine("Uploading files ...");
for (int i = 0; i < files.Count; i++)
Uploadfile(files[i].localfilename, i, files[i].remotefilename, backend, disableStreaming);
Console.WriteLine("Verifying file list ...");
curlist = backend.List();
foreach (Library.Interface.IFileEntry fe in curlist)
if (!fe.IsFolder)
{
bool found = false;
foreach (TempFile tx in files)
if (tx.remotefilename == fe.Name)
{
if (tx.found)
Console.WriteLine("*** File with name {0} was found more than once", tx.remotefilename);
found = true;
tx.found = true;
if (fe.Size > 0 && tx.length != fe.Size)
Console.WriteLine("*** File with name {0} has size {1} but the size was reported as {2}", tx.remotefilename, tx.length, fe.Size);
break;
}
if (!found)
Console.WriteLine("*** File with name {0} was found on server but not uploaded!", fe.Name);
}
foreach (TempFile tx in files)
if (!tx.found)
Console.WriteLine("*** File with name {0} was uploaded but not found afterwards", tx.remotefilename);
Console.WriteLine("Downloading files");
for (int i = 0; i < files.Count; i++)
{
using (Duplicati.Library.Utility.TempFile cf = new Duplicati.Library.Utility.TempFile())
{
Exception e = null;
Console.Write("Downloading file {0} ... ", i);
try
{
if (backend is Library.Interface.IStreamingBackend && !disableStreaming)
{
using (System.IO.FileStream fs = new System.IO.FileStream(cf, System.IO.FileMode.Create, System.IO.FileAccess.Write, System.IO.FileShare.None))
using (NonSeekableStream nss = new NonSeekableStream(fs))
(backend as Library.Interface.IStreamingBackend).Get(files[i].remotefilename, nss);
}
else
backend.Get(files[i].remotefilename, cf);
e = null;
}
catch (Exception ex)
{
e = ex;
}
if (e != null)
Console.WriteLine("failed\n*** Error: {0}", e.ToString());
else
Console.WriteLine("done");
Console.Write("Checking hash ... ");
using (System.IO.FileStream fs = new System.IO.FileStream(cf, System.IO.FileMode.Open, System.IO.FileAccess.Read))
if (Convert.ToBase64String(sha.ComputeHash(fs)) != Convert.ToBase64String(files[i].hash))
{
if (dummyFileHash != null && Convert.ToBase64String(sha.ComputeHash(fs)) == Convert.ToBase64String(dummyFileHash))
Console.WriteLine("failed\n*** Downloaded file was the dummy file");
else
Console.WriteLine("failed\n*** Downloaded file was corrupt");
}
else
Console.WriteLine("done");
}
}
Console.WriteLine("Deleting files...");
foreach (TempFile tx in files)
try { backend.Delete(tx.remotefilename); }
catch (Exception ex)
{
Console.WriteLine("*** Failed to delete file {0}, message: {1}", tx.remotefilename, ex.ToString());
}
curlist = backend.List();
foreach (Library.Interface.IFileEntry fe in curlist)
if (!fe.IsFolder)
{
Console.WriteLine("*** Remote folder contains {0} after cleanup", fe.Name);
}
}
}
finally
{
foreach (Library.Interface.IGenericModule m in loadedModules)
if (m is IDisposable)
((IDisposable)m).Dispose();
}
return true;
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -59,6 +59,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Help.cs" />
<Compile Include="CommandLineParser.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
@@ -152,18 +153,43 @@
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<Content Include="..\..\thirdparty\gpg\gpg.exe">
<Link>win-tools\gpg.exe</Link>
<Content Include="..\..\thirdparty\gpg\gpg2.exe">
<Link>win-tools\gpg2.exe</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\thirdparty\gpg\gpg\gpg.exe">
<Link>win-tools\gpg\gpg.exe</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\thirdparty\gpg\iconv.dll">
<Link>win-tools\iconv.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\thirdparty\gpg\libadns-1.dll">
<Link>win-tools\libadns-1.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\thirdparty\gpg\libassuan-0.dll">
<Link>win-tools\libassuan-0.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\thirdparty\gpg\libgcrypt-11.dll">
<Link>win-tools\libgcrypt-11.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\thirdparty\gpg\libgpg-error-0.dll">
<Link>win-tools\libgpg-error-0.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\thirdparty\gpg\zlib1.dll">
<Link>win-tools\zlib1.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\thirdparty\Putty\pscp.exe">
<Link>win-tools\pscp.exe</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<EmbeddedResource Include="help.txt" />
<Content Include="TrayWarning.ico" />
</ItemGroup>
<ItemGroup>
@@ -181,4 +207,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
+477
View File
@@ -0,0 +1,477 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Duplicati.CommandLine
{
public static class Help
{
private static readonly Dictionary<string, string> _document;
private const string RESOURCE_NAME = "Duplicati.CommandLine.help.txt";
private static readonly System.Text.RegularExpressions.Regex NAMEDOPTION_REGEX = new System.Text.RegularExpressions.Regex("\\%OPTION\\:(?<name>[^\\%]+)\\%");
static Help()
{
_document = new Dictionary<string,string>(StringComparer.InvariantCultureIgnoreCase);
using (System.IO.StreamReader sr = new System.IO.StreamReader(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(RESOURCE_NAME)))
{
List<string> keywords = new List<string>();
StringBuilder sb = new StringBuilder();
foreach(var line in sr.ReadToEnd().Split(new string[] { "\r\n", "\n", "\r" }, StringSplitOptions.None))
{
if (line.Trim().StartsWith("#"))
continue;
if (line.Trim().StartsWith(">"))
{
if (sb.Length > 0)
{
string s = sb.ToString();
foreach(var k in keywords)
_document[k] = s;
keywords.Clear();
sb.Length = 0;
}
string[] elems = line.Split(new string[] {" ", "\t"}, StringSplitOptions.RemoveEmptyEntries);
if (elems.Length >= 2 && string.Equals(elems[elems.Length - 2], "help", StringComparison.InvariantCultureIgnoreCase))
keywords.Add(elems[elems.Length - 1]);
else if (elems.Length == 3 && string.Equals(elems[elems.Length - 1], "help", StringComparison.InvariantCultureIgnoreCase))
keywords.Add("help");
}
else
{
sb.AppendLine(line);
}
}
if (sb.Length > 0)
{
string s = sb.ToString();
foreach(var k in keywords)
_document[k] = s;
}
}
}
public static void PrintUsage(string topic, IDictionary<string, string> options)
{
try
{
//Force translation off
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture;
System.Threading.Thread.CurrentThread.CurrentUICulture = System.Globalization.CultureInfo.InvariantCulture;
}
catch { }
if (string.IsNullOrEmpty(topic) || topic.Trim().Length == 0)
topic = "help";
if (string.Equals("help", topic, StringComparison.InvariantCultureIgnoreCase) && options.Count == 1)
topic = new List<string>(options.Keys)[0];
if (_document.ContainsKey(topic))
{
string tp = _document[topic];
Library.Main.Options opts = new Library.Main.Options(new Dictionary<string, string>());
tp = tp.Replace("%VERSION%", License.VersionNumbers.Version);
tp = tp.Replace("%BACKENDS%", string.Join(", ", Library.DynamicLoader.BackendLoader.Keys));
tp = tp.Replace("%MONO%", Library.Utility.Utility.IsMono ? "mono " : "");
tp = tp.Replace("%APP_PATH%", System.IO.Path.GetFileName(System.Reflection.Assembly.GetExecutingAssembly().Location));
tp = tp.Replace("%EXAMPLE_SOURCE_PATH%", Library.Utility.Utility.IsClientLinux ? "/source" : "D:\\source");
tp = tp.Replace("%EXAMPLE_SOURCE_FILE%", Library.Utility.Utility.IsClientLinux ? "/source/myfile.txt" : "D:\\source\\file.txt");
tp = tp.Replace("%EXAMPLE_RESTORE_PATH%", Library.Utility.Utility.IsClientLinux ? "/restore" : "D:\\restore");
tp = tp.Replace("%ENCRYPTIONMODULES%", string.Join(", ", Library.DynamicLoader.EncryptionLoader.Keys));
tp = tp.Replace("%COMPRESSIONMODULES%", string.Join(", ", Library.DynamicLoader.CompressionLoader.Keys));
tp = tp.Replace("%DEFAULTENCRYPTIONMODULE%", opts.EncryptionModule);
tp = tp.Replace("%DEFAULTCOMPRESSIONMODULE%", opts.CompressionModule);
tp = tp.Replace("%GENERICMODULES%", string.Join(", ", Library.DynamicLoader.GenericLoader.Keys));
if (tp.Contains("%MAINOPTIONS%"))
{
List<string> lines = new List<string>();
SortedList<string, Library.Interface.ICommandLineArgument> sorted = new SortedList<string, Library.Interface.ICommandLineArgument>();
foreach (Library.Interface.ICommandLineArgument arg in opts.SupportedCommands)
sorted.Add(arg.Name, arg);
foreach (Library.Interface.ICommandLineArgument arg in Program.SupportedCommands)
sorted.Add(arg.Name, arg);
foreach (Library.Interface.ICommandLineArgument arg in sorted.Values)
lines.Add(PrintArgSimple(arg, arg.Name));
tp = tp.Replace("%MAINOPTIONS%", string.Join(Environment.NewLine, lines.ToArray()));
}
if (tp.Contains("%ALLOPTIONS%"))
{
List<string> lines = new List<string>();
foreach (Library.Interface.ICommandLineArgument arg in opts.SupportedCommands)
Library.Interface.CommandLineArgument.PrintArgument(lines, arg, " ");
foreach (Library.Interface.ICommandLineArgument arg in Program.SupportedCommands)
Library.Interface.CommandLineArgument.PrintArgument(lines, arg, " ");
lines.Add("");
lines.Add("");
lines.Add(Strings.Program.SupportedBackendsHeader);
foreach (Duplicati.Library.Interface.IBackend back in Library.DynamicLoader.BackendLoader.Backends)
PrintBackend(back, lines);
lines.Add("");
lines.Add("");
lines.Add(Strings.Program.SupportedEncryptionModulesHeader);
foreach (Duplicati.Library.Interface.IEncryption mod in Library.DynamicLoader.EncryptionLoader.Modules)
PrintEncryptionModule(mod, lines);
lines.Add("");
lines.Add("");
lines.Add(Strings.Program.SupportedCompressionModulesHeader);
foreach (Duplicati.Library.Interface.ICompression mod in Library.DynamicLoader.CompressionLoader.Modules)
PrintCompressionModule(mod, lines);
lines.Add("");
lines.Add("");
lines.Add("");
lines.Add(Strings.Program.GenericModulesHeader);
foreach (Duplicati.Library.Interface.IGenericModule mod in Library.DynamicLoader.GenericLoader.Modules)
PrintGenericModule(mod, lines);
lines.Add("");
tp = tp.Replace("%ALLOPTIONS%", string.Join(Environment.NewLine, lines.ToArray()));
}
if (tp.Contains("%MODULEOPTIONS%"))
{
//Figure out which module we are in
IList<Library.Interface.ICommandLineArgument> args = null;
bool found = false;
foreach (Duplicati.Library.Interface.IBackend backend in Library.DynamicLoader.BackendLoader.Backends)
if (string.Equals(backend.ProtocolKey, topic, StringComparison.InvariantCultureIgnoreCase))
{
args = backend.SupportedCommands;
found = true;
break;
}
if (args == null)
foreach (Duplicati.Library.Interface.IEncryption module in Library.DynamicLoader.EncryptionLoader.Modules)
if (string.Equals(module.FilenameExtension, topic, StringComparison.InvariantCultureIgnoreCase))
{
args = module.SupportedCommands;
found = true;
break;
}
if (args == null)
foreach (Duplicati.Library.Interface.ICompression module in Library.DynamicLoader.CompressionLoader.Modules)
if (string.Equals(module.FilenameExtension, topic, StringComparison.InvariantCultureIgnoreCase))
{
args = module.SupportedCommands;
found = true;
break;
}
if (args == null)
foreach (Duplicati.Library.Interface.IGenericModule module in Library.DynamicLoader.GenericLoader.Modules)
if (string.Equals(module.Key, topic, StringComparison.InvariantCultureIgnoreCase))
{
args = module.SupportedCommands;
found = true;
break;
}
//If the module is not found, we do not display the description
if (found)
tp = tp.Replace("%MODULEOPTIONS%", PrintArgsSimple(args));
else
{
Console.WriteLine("Topic not found: {0}", topic);
Console.WriteLine();
//Prevent recursive lookups
if (topic != "help")
PrintUsage("help", new Dictionary<string, string>());
return;
}
}
if (NAMEDOPTION_REGEX.IsMatch(tp))
tp = NAMEDOPTION_REGEX.Replace(tp, new Matcher().MathEvaluator);
PrintFormatted(tp.Split(new string[] { Environment.NewLine }, StringSplitOptions.None));
}
else
{
List<string> lines = new List<string>();
foreach (Duplicati.Library.Interface.IBackend backend in Library.DynamicLoader.BackendLoader.Backends)
if (string.Equals(backend.ProtocolKey, topic, StringComparison.InvariantCultureIgnoreCase))
{
PrintBackend(backend, lines);
break;
}
if (lines.Count == 0)
foreach (Duplicati.Library.Interface.IEncryption mod in Library.DynamicLoader.EncryptionLoader.Modules)
if (string.Equals(mod.FilenameExtension, topic, StringComparison.InvariantCultureIgnoreCase))
{
PrintEncryptionModule(mod, lines);
break;
}
if (lines.Count == 0)
foreach (Duplicati.Library.Interface.ICompression mod in Library.DynamicLoader.CompressionLoader.Modules)
if (string.Equals(mod.FilenameExtension, topic, StringComparison.InvariantCultureIgnoreCase))
{
PrintCompressionModule(mod, lines);
break;
}
if (lines.Count == 0)
foreach (Duplicati.Library.Interface.IGenericModule mod in Library.DynamicLoader.GenericLoader.Modules)
if (string.Equals(mod.Key, topic, StringComparison.InvariantCultureIgnoreCase))
{
PrintGenericModule(mod, lines);
break;
}
if (lines.Count == 0)
PrintArgumentIfFound(new Matcher().Values, topic, lines);
if (lines.Count != 0)
{
PrintFormatted(lines);
}
else
{
Console.WriteLine("Topic not found: {0}", topic);
Console.WriteLine();
PrintUsage("help", new Dictionary<string, string>());
}
}
}
private static void PrintArgumentIfFound(IEnumerable<Duplicati.Library.Interface.ICommandLineArgument> args, string topic, List<string> lines)
{
if (args == null)
return;
foreach (Duplicati.Library.Interface.ICommandLineArgument arg in args)
{
if (string.Equals(arg.Name, topic, StringComparison.InvariantCultureIgnoreCase))
{
Library.Interface.CommandLineArgument.PrintArgument(lines, arg, " ");
return;
}
if (arg.Aliases != null)
foreach (string k in arg.Aliases)
{
if (string.Equals(k, topic, StringComparison.InvariantCultureIgnoreCase))
{
Library.Interface.CommandLineArgument.PrintArgument(lines, arg, " ");
return;
}
}
}
}
private static void PrintBackend(Duplicati.Library.Interface.IBackend back, List<string> lines)
{
lines.Add(back.DisplayName + " (" + back.ProtocolKey + "):");
lines.Add(" " + back.Description);
if (back.SupportedCommands != null && back.SupportedCommands.Count > 0)
{
lines.Add(" " + Strings.Program.SupportedOptionsHeader);
foreach (Library.Interface.ICommandLineArgument arg in back.SupportedCommands)
Library.Interface.CommandLineArgument.PrintArgument(lines, arg, " ");
}
lines.Add("");
}
private static void PrintEncryptionModule(Duplicati.Library.Interface.IEncryption mod, List<string> lines)
{
lines.Add(mod.DisplayName + " (." + mod.FilenameExtension + "):");
lines.Add(" " + mod.Description);
if (mod.SupportedCommands != null && mod.SupportedCommands.Count > 0)
{
lines.Add(" " + Strings.Program.SupportedOptionsHeader);
foreach (Library.Interface.ICommandLineArgument arg in mod.SupportedCommands)
Library.Interface.CommandLineArgument.PrintArgument(lines, arg, " ");
}
lines.Add("");
}
private static void PrintCompressionModule(Duplicati.Library.Interface.ICompression mod, List<string> lines)
{
lines.Add(mod.DisplayName + " (." + mod.FilenameExtension + "):");
lines.Add(" " + mod.Description);
if (mod.SupportedCommands != null && mod.SupportedCommands.Count > 0)
{
lines.Add(" " + Strings.Program.SupportedOptionsHeader);
foreach (Library.Interface.ICommandLineArgument arg in mod.SupportedCommands)
Library.Interface.CommandLineArgument.PrintArgument(lines, arg, " ");
}
lines.Add("");
}
private static void PrintGenericModule(Duplicati.Library.Interface.IGenericModule mod, List<string> lines)
{
lines.Add(mod.DisplayName + " (" + mod.Key + "):");
lines.Add(" " + mod.Description);
lines.Add(" " + (mod.LoadAsDefault ? Strings.Program.ModuleIsLoadedAutomatically : Strings.Program.ModuleIsNotLoadedAutomatically));
if (mod.SupportedCommands != null && mod.SupportedCommands.Count > 0)
{
lines.Add(" " + Strings.Program.SupportedOptionsHeader);
foreach (Library.Interface.ICommandLineArgument arg in mod.SupportedCommands)
Library.Interface.CommandLineArgument.PrintArgument(lines, arg, " ");
}
lines.Add("");
}
private static string PrintArguments(IEnumerable<Duplicati.Library.Interface.ICommandLineArgument> args)
{
if (args == null)
return "";
List<string> lines = new List<string>();
foreach (Library.Interface.ICommandLineArgument arg in args)
Library.Interface.CommandLineArgument.PrintArgument(lines, arg, " ");
return string.Join(Environment.NewLine, lines.ToArray());
}
private static void PrintFormatted(IEnumerable<string> lines)
{
foreach (string s in lines)
{
if (string.IsNullOrEmpty(s) || s.Trim().Length == 0)
{
Console.WriteLine();
continue;
}
string c = s;
string leadingSpaces = "";
while (c.Length > 0 && c.StartsWith(" "))
{
leadingSpaces += " ";
c = c.Remove(0, 1);
}
bool extraIndent = c.StartsWith("--");
while (c.Length > 0)
{
int len = Math.Min(Console.WindowWidth - 2, leadingSpaces.Length + c.Length);
len -= leadingSpaces.Length;
if (len < c.Length)
{
int ix = c.LastIndexOf(" ", len);
if (ix > 0)
len = ix;
}
Console.WriteLine(leadingSpaces + c.Substring(0, len).Trim());
c = c.Remove(0, len);
if (extraIndent)
{
extraIndent = false;
leadingSpaces += " ";
}
}
}
}
private class Matcher
{
Dictionary<string, Library.Interface.ICommandLineArgument> args = new Dictionary<string, Library.Interface.ICommandLineArgument>(StringComparer.InvariantCultureIgnoreCase);
public Matcher()
{
Library.Main.Options opts = new Library.Main.Options(new Dictionary<string, string>());
List<IList<Library.Interface.ICommandLineArgument>> foundArgs = new List<IList<Library.Interface.ICommandLineArgument>>();
foundArgs.Add(new Library.Main.Options(new Dictionary<string, string>()).SupportedCommands);
foundArgs.Add(Program.SupportedCommands);
foreach (Duplicati.Library.Interface.IBackend backend in Library.DynamicLoader.BackendLoader.Backends)
if (backend.SupportedCommands != null)
foundArgs.Add(backend.SupportedCommands);
foreach (Duplicati.Library.Interface.IEncryption mod in Library.DynamicLoader.EncryptionLoader.Modules)
if (mod.SupportedCommands != null)
foundArgs.Add(mod.SupportedCommands);
foreach (Duplicati.Library.Interface.ICompression mod in Library.DynamicLoader.CompressionLoader.Modules)
if (mod.SupportedCommands != null)
foundArgs.Add(mod.SupportedCommands);
foreach (Duplicati.Library.Interface.IGenericModule mod in Library.DynamicLoader.GenericLoader.Modules)
if (mod.SupportedCommands != null)
foundArgs.Add(mod.SupportedCommands);
foreach (IEnumerable<Library.Interface.ICommandLineArgument> arglst in foundArgs)
if (arglst != null)
{
foreach (Library.Interface.ICommandLineArgument arg in arglst)
{
if (!args.ContainsKey(arg.Name))
args[arg.Name] = arg;
if (arg.Aliases != null)
foreach (string a in arg.Aliases)
if (!args.ContainsKey(a))
args[a] = arg;
}
}
}
public IEnumerable<Library.Interface.ICommandLineArgument> Values { get { return args.Values; } }
public string MathEvaluator(System.Text.RegularExpressions.Match m)
{
if (!m.Success || !m.Groups["name"].Success)
return "";
Duplicati.Library.Interface.ICommandLineArgument arg;
if (!args.TryGetValue(m.Groups["name"].Value, out arg))
return "";
else
return PrintArgSimple(arg, m.Groups["name"].Value.ToLowerInvariant());
}
}
private static string PrintArgsSimple(IEnumerable<Duplicati.Library.Interface.ICommandLineArgument> args)
{
if (args == null)
return "";
List<string> lines = new List<string>();
foreach(Duplicati.Library.Interface.ICommandLineArgument arg in args)
lines.Add(PrintArgSimple(arg, arg.Name));
return string.Join(Environment.NewLine, lines.ToArray());
}
private static string PrintArgSimple(Duplicati.Library.Interface.ICommandLineArgument arg, string name)
{
if (string.IsNullOrEmpty(arg.DefaultValue))
return string.Format(" --{0}{1} {2}", name, Environment.NewLine, arg.LongDescription);
else
return string.Format(" --{0} = {1}{2} {3}", name, arg.DefaultValue, Environment.NewLine, arg.LongDescription);
}
}
}
+143 -22
View File
@@ -35,26 +35,17 @@ namespace Duplicati.CommandLine
string filter = Duplicati.Library.Utility.FilenameFilter.EncodeAsFilter(Duplicati.Library.Utility.FilenameFilter.ParseCommandLine(cargs, true));
Dictionary<string, string> options = CommandLineParser.ExtractOptions(cargs);
foreach (string internaloption in Library.Main.Options.InternalOptions)
if (options.ContainsKey(internaloption))
{
Console.WriteLine(Strings.Program.InternalOptionUsedError, internaloption);
return;
}
if (!string.IsNullOrEmpty(filter))
options["filter"] = filter;
//If we are on Windows, append the bundled "win-tools" programs to the search path
//We add it last, to allow the user to override with other versions
if (!Library.Utility.Utility.IsClientLinux)
{
string wintools = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), "win-tools");
Environment.SetEnvironmentVariable("PATH",
Environment.GetEnvironmentVariable("PATH") +
System.IO.Path.PathSeparator.ToString() +
System.IO.Path.Combine(
System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location),
"win-tools")
wintools +
System.IO.Path.PathSeparator.ToString() +
System.IO.Path.Combine(wintools, "gpg") //GPG needs to be in a subfolder for wrapping reasons
);
}
@@ -92,6 +83,36 @@ namespace Duplicati.CommandLine
}
}
//AFTER converting options to commands, we check for internal switches
foreach (string internaloption in Library.Main.Options.InternalOptions)
if (options.ContainsKey(internaloption))
{
Console.WriteLine(Strings.Program.InternalOptionUsedError, internaloption);
return;
}
if ((options.ContainsKey("parameters-file") && !string.IsNullOrEmpty("parameters-file")) || (options.ContainsKey("parameter-file") && !string.IsNullOrEmpty("parameter-file")))
{
string filename;
if (options.ContainsKey("parameters-file") && !string.IsNullOrEmpty("parameters-file"))
{
filename = options["parameters-file"];
options.Remove("parameters-file");
}
else
{
filename = options["parameter-file"];
options.Remove("parameter-file");
}
if (!ReadOptionsFromFile(filename, ref filter, cargs, options))
return;
}
//After checking for internal options, we set the filter option
if (!string.IsNullOrEmpty(filter))
options["filter"] = filter;
if (cargs.Count == 1)
{
switch (cargs[0].Trim().ToLower())
@@ -102,15 +123,12 @@ namespace Duplicati.CommandLine
}
}
if (cargs.Count < 2)
if (cargs.Count < 2 || cargs[0].Trim().Equals("help", StringComparison.InvariantCultureIgnoreCase))
{
if (cargs.Count == 0 || cargs[0].Trim().Equals("help", StringComparison.InvariantCultureIgnoreCase))
PrintUsage(true);
if (cargs.Count < 2)
Help.PrintUsage("help", options);
else
{
PrintUsage(false);
PrintWrongNumberOfArguments(cargs, 2);
}
Help.PrintUsage(cargs[1], options);
return;
@@ -127,6 +145,12 @@ namespace Duplicati.CommandLine
options["restore"] = null;
cargs.RemoveAt(0);
}
else if (source.Trim().ToLower() == "backup" && cargs.Count == 3)
{
source = target;
target = cargs[2];
cargs.RemoveAt(0);
}
if (!options.ContainsKey("passphrase"))
if (!string.IsNullOrEmpty(System.Environment.GetEnvironmentVariable("PASSPHRASE")))
@@ -449,10 +473,107 @@ namespace Duplicati.CommandLine
private static void PrintWrongNumberOfArguments(List<string> args, int expected)
{
Console.WriteLine(Strings.Program.WrongNumberOfCommandsError_v2, args.Count, expected, args.Count == 0 ? "" : "\"" + string.Join("\", \"", args.ToArray()) + "\"");
}
private static void PrintUsage(bool extended)
public static IList<Library.Interface.ICommandLineArgument> SupportedCommands
{
get
{
return new List<Library.Interface.ICommandLineArgument>(new Library.Interface.ICommandLineArgument[] {
new Library.Interface.CommandLineArgument("parameters-file", Library.Interface.CommandLineArgument.ArgumentType.Path, Strings.Program.ParametersFileOptionShort, Strings.Program.ParametersFileOptionLong, "", new string[] {"parameter-file"})
});
}
}
private static bool ReadOptionsFromFile(string filename, ref string filter, IList<string> cargs, Dictionary<string, string> options)
{
try
{
List<string> fargs = new List<string>(Library.Utility.Utility.ReadFileWithDefaultEncoding(filename).Replace("\r", "").Split(new String[] { "\n" }, StringSplitOptions.RemoveEmptyEntries));
string newfilter = Duplicati.Library.Utility.FilenameFilter.EncodeAsFilter(Duplicati.Library.Utility.FilenameFilter.ParseCommandLine(fargs, true));
// If the user specifies parameters-file, all filters must be in the file.
// Allowing to specify some filters on the command line could result in wrong filter ordering
if (!string.IsNullOrEmpty(filter) && !string.IsNullOrEmpty(newfilter))
throw new Exception(Strings.Program.FiltersCannotBeUsedWithFileError);
filter = newfilter;
Dictionary<string, string> opt = CommandLineParser.ExtractOptions(fargs);
String newsource = null, newtarget = null;
foreach (KeyValuePair<String, String> keyvalue in opt)
{
switch (keyvalue.Key.ToLower())
{
// This replaces any previous value, file parameters take precedence;
case "source":
newsource = keyvalue.Value;
break;
case "target":
newtarget = keyvalue.Value;
break;
default:
options[keyvalue.Key] = keyvalue.Value;
break;
}
}
// When the action is to backup, allow the source and/or the target
// to be specified in the parameters file as --source= and --target=.
// Note: this block is faily complex due to the way parameters are handled by the rest of the
// procedure. It could likely be much simpler and versatile (allow --source and --target on
// restore or other actions) with some refactoring of the parameters decision tree
if (!String.IsNullOrEmpty(newsource) || !String.IsNullOrEmpty(newtarget))
{
int offset = cargs.Count > 0 && (cargs[0] == "backup" || cargs[0] == "restore") ? 1 : 0;
bool isrestore = cargs.Count > 0 && cargs[0] == "restore"
|| cargs.Count >= 2 && cargs[0].Contains("://");
if (cargs.Count == 0 + offset)
{
// if either is empty loading will fail later, so we don't really care.
if (!String.IsNullOrEmpty(newsource)) cargs.Add(newsource);
if (!String.IsNullOrEmpty(newtarget)) cargs.Add(newtarget);
}
else
{
bool isurl = cargs[offset].Contains("://");
bool isdir = !isurl && cargs[offset].IndexOfAny(new char[] { '/', '\\', ':' }) >= 0;
if (offset > 0 || isdir || isurl)
{
if (cargs.Count == 1 + offset)
{
if (isrestore ^ isurl)
{
if (!String.IsNullOrEmpty(newtarget)) cargs[offset] = newtarget;
if (!String.IsNullOrEmpty(newsource)) cargs.Insert(offset, newsource);
}
else
{
if (!String.IsNullOrEmpty(newtarget)) cargs[offset] = newsource;
if (!String.IsNullOrEmpty(newsource)) cargs.Add(newtarget);
}
}
else
{
if (!String.IsNullOrEmpty(newsource)) cargs[offset] = newsource;
if (!String.IsNullOrEmpty(newtarget)) cargs[offset + 1] = newtarget;
}
}
}
}
return true;
}
catch (Exception e)
{
Console.WriteLine(Strings.Program.FailedToParseParametersFileError, filename, e.Message);
return false;
}
}
private static void PrintOldUsage(bool extended)
{
bool isLinux = Library.Utility.Utility.IsClientLinux;
+37 -1
View File
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.237
// Runtime Version:4.0.30319.544
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -134,6 +134,15 @@ namespace Duplicati.CommandLine.Strings {
}
}
/// <summary>
/// Looks up a localized string similar to Unable to read the parameters file &quot;{0}&quot;, reason: {1}.
/// </summary>
internal static string FailedToParseParametersFileError {
get {
return ResourceManager.GetString("FailedToParseParametersFileError", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to &lt; not found &gt;.
/// </summary>
@@ -143,6 +152,15 @@ namespace Duplicati.CommandLine.Strings {
}
}
/// <summary>
/// Looks up a localized string similar to Filters cannot be specified on the commandline if filters are also present in the parameter file.
/// </summary>
internal static string FiltersCannotBeUsedWithFileError {
get {
return ResourceManager.GetString("FiltersCannotBeUsedWithFileError", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {0}\t{1}.
/// </summary>
@@ -242,6 +260,24 @@ namespace Duplicati.CommandLine.Strings {
}
}
/// <summary>
/// Looks up a localized string similar to This option can be used to store some or all of the options given to the commandline client. The file must be a plain text file, UTF-8 encoding is preferred. Each line in the file should be of the format --option=value. The special options --source and --target can be used to override the localpath and the remote destination uri, respectively. The options in this file take precedence over the options provided on the commandline. You cannot specify filters in both the file and on the commandline..
/// </summary>
internal static string ParametersFileOptionLong {
get {
return ResourceManager.GetString("ParametersFileOptionLong", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Path to a file with parameters.
/// </summary>
internal static string ParametersFileOptionShort {
get {
return ResourceManager.GetString("ParametersFileOptionShort", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to A &lt;backend&gt; is identified by an url like ftp://host/ or ssh://server/.
/// Using this system, Duplicati can detect if you want to backup or restore.
@@ -143,9 +143,15 @@ Type\tTime\t\t\tVolumes\tSize</value>
<data name="DuplicatiOptionsHeader" xml:space="preserve">
<value>Duplicati options:</value>
</data>
<data name="FailedToParseParametersFileError" xml:space="preserve">
<value>Unable to read the parameters file "{0}", reason: {1}</value>
</data>
<data name="FileEntryNotFound" xml:space="preserve">
<value>&lt; not found &gt;</value>
</data>
<data name="FiltersCannotBeUsedWithFileError" xml:space="preserve">
<value>Filters cannot be specified on the commandline if filters are also present in the parameter file</value>
</data>
<data name="FindLastVersionEntry" xml:space="preserve">
<value>{0}\t{1}</value>
</data>
@@ -179,6 +185,12 @@ Type\tTime\t\t\tVolumes\tSize</value>
<data name="NewOrModifiedFilesHeader" xml:space="preserve">
<value>New/Modified files</value>
</data>
<data name="ParametersFileOptionLong" xml:space="preserve">
<value>This option can be used to store some or all of the options given to the commandline client. The file must be a plain text file, UTF-8 encoding is preferred. Each line in the file should be of the format --option=value. The special options --source and --target can be used to override the localpath and the remote destination uri, respectively. The options in this file take precedence over the options provided on the commandline. You cannot specify filters in both the file and on the commandline.</value>
</data>
<data name="ParametersFileOptionShort" xml:space="preserve">
<value>Path to a file with parameters</value>
</data>
<data name="ProgramUsageBackend" xml:space="preserve">
<value>A &lt;backend&gt; is identified by an url like ftp://host/ or ssh://server/.
Using this system, Duplicati can detect if you want to backup or restore.
+31 -7
View File
@@ -112,16 +112,22 @@ namespace Duplicati.CommandLine
options["backup-prefix"] = "duplicati_unittest";
//This would break the test, because the data is not modified the normal way
options["disable-filetime-check"] = null;
options["disable-filetime-check"] = "true";
//We do not use the same folder, so we need this option
options["allow-sourcefolder-change"] = null;
options["allow-sourcefolder-change"] = "true";
//We want all messages in the log
options["log-level"] = LogMessageType.Profiling.ToString();
//We cannot rely on USN numbering, but we can use USN enumeration
//options["disable-usn-diff-check"] = null;
//options["disable-usn-diff-check"] = "true";
//We use precise times
options["disable-time-tolerance"] = "true";
options["verification-level"] = "full";
//We need all sets, even if they are unchanged
options["upload-unchanged-backups"] = "true";
using(new Timer("Total unittest"))
using(TempFolder tf = new TempFolder())
{
@@ -343,6 +349,22 @@ namespace Duplicati.CommandLine
Log.CurrentLog = null;
}
/// <summary>
/// Returns the index of a given string, using the file system case sensitivity
/// </summary>
/// <returns>The index of the entry or -1 if no entry was found</returns>
/// <param name='lst'>The list to search</param>
/// <param name='m'>The string to find</param>
private static int IndexOf(List<string> lst, string m)
{
StringComparison sc = Duplicati.Library.Utility.Utility.ClientFilenameStringComparision;
for(int i = 0; i < lst.Count; i++)
if (lst[i].Equals(m, sc))
return i;
return -1;
}
/// <summary>
/// Verifies the existence of all files and folders, and ensures that all
/// files are binary equal.
@@ -361,13 +383,14 @@ namespace Duplicati.CommandLine
{
string relpath = s.Substring(f1.Length);
string target = System.IO.Path.Combine(f2, relpath);
if (!folders2.Contains(target))
int ix = IndexOf(folders2, target);
if (ix < 0)
{
Log.WriteMessage("Missing folder: " + relpath, LogMessageType.Error);
Console.WriteLine("Missing folder: " + relpath);
}
else
folders2.Remove(target);
folders2.RemoveAt(ix);
}
foreach (string s in folders2)
@@ -382,14 +405,15 @@ namespace Duplicati.CommandLine
{
string relpath = s.Substring(f1.Length);
string target = System.IO.Path.Combine(f2, relpath);
if (!files2.Contains(target))
int ix = IndexOf(files2, target);
if (ix < 0)
{
Log.WriteMessage("Missing file: " + relpath, LogMessageType.Error);
Console.WriteLine("Missing file: " + relpath);
}
else
{
files2.Remove(target);
files2.RemoveAt(ix);
if (!CompareFiles(s, target, relpath))
{
Log.WriteMessage("File differs: " + relpath, LogMessageType.Error);
+7 -1
View File
@@ -1,3 +1,9 @@
<?xml version="1.0"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true"/></configuration>
<runtime>
<loadFromRemoteSources enabled="true" />
</runtime>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
</configuration>
+397
View File
@@ -0,0 +1,397 @@
# This file is the help for the Duplicati Command Line Client. It shows what
# commands the CLI understands and what the outputs are. Sometimes we used
# placeholders for options. In that case descriptions are taken directly from
# the modules. Sometimes we described options here. The reason for that is,
# that we found the new description much better but did not want to create a
# need for translation as many options are described in the UI as well and
# they are translated there.
# =============================================================================
> duplicati.commandline.exe
> duplicati.commandline.exe help
See duplicati.commandline.exe help <topic> for more information.
Examples: example
Commands: backup, restore, delete-all-but-n-full, delete-all-but-n, cleanup, delete-older-than, list, list-current-files, list-source-folders, list-actual-signature-files, collection-status, create-folder, find-last-version, verify
Debugging: debug, logging
Targets: %BACKENDS%
Modules: %ENCRYPTIONMODULES%, %COMPRESSIONMODULES%, %GENERICMODULES%
Formats: date, time, size, encryption, compression
Advanced options: advanced, filter, <option> (e.g. --auto-cleanup)
http://www.duplicati.com/ Version: %VERSION%
# =============================================================================
> duplicati.commandline.exe help example
> duplicati.commandline.exe help examples
Make an encrypted backup
========================
The following command will make an encrypted backup and store it on an FTP server. The first backup will be full followed by 10 incremental backups before another full backup is made. As no passphrase is specified, the user will be prompted for a password. The upload speed is throttled to 500kB/s.
%MONO%"%APP_PATH%" backup
"%EXAMPLE_SOURCE_PATH%" "ftp://ftp.example.com/target"
--ftp-username=username
--ftp-password=password
--full-if-more-than-n-incrementals=10
--auto-cleanup
--max-upload-pr-second=500kB
Delete old backups
==================
The following command will delete old backups. If no passphrase is specified, the user will be prompted for a passphrase. The option --force is required to delete the files; without that option no files will be deleted. Duplicati does not delete backup files that are required to restore files from a valid newer backup (a full backup is always required to restore files from an incremental backup).
%MONO%"%APP_PATH%" delete-older-than 10D
"ftp://ftp.example.com/target"
--ftp-username=username
--ftp-password=password
--force
Restore a specific file
=======================
The following command will restore "%EXAMPLE_SOURCE_FILE%" from the backup in the latest version to the local folder "%EXAMPLE_RESTORE_PATH%".
%MONO%"%APP_PATH%" restore
"ftp://ftp.example.com/target" "%EXAMPLE_RESTORE_PATH%"
--ftp-username=username
--ftp-password=password
--file-to-restore="%EXAMPLE_SOURCE_FILE%"
# =============================================================================
> duplicati.commandline.exe help backup
Usage: backup <source folder> <target url> <options>
This will perform full or incremental backups. It reads all files from <source folder> and stores the backups in <target url>. If no rule for full backups is specified, Duplicati will create one full backup and incremental backups afterwards. Multiple source folders have to be separated by the operating system's delimiter (semicolon ";" on Windows, colon ":" on Linux).
Options:
--auto-cleanup
Removes all files that do not belong to the backup (e.g. partial files caused by interrupted uploads).
--backup-prefix = <string>
Replaces the default "duplicati" with <string> in the file names of the backup files. It is required to specify different prefixes if multiple backups are stored in the same target folder.
--full
Make a full backup. If nothing is specified, an initial full backup is made with incremental backups afterwards.
--full-if-older-than = <date>
Make a new full backup after the specified relative date or time.
--full-if-more-than-n-incrementals = <number>
Make a full backup after n incremental backups.
--max-upload-pr-second = <size>
Limits the upload speed to the specified value. <size> is interpreted as bandwidth/s.
--no-encryption
The backup is NOT encrypted with a passphrase. Unencrypted files are stored.
--passphrase = <passphrase>
The passphrase that is used to encrypt the backup. If nothing is specified here, the environment variable PASSPHRASE will be used or the user will be prompted to type in the passphrase.
--volsize = <size>
The maximum size of files being written to the target. Default size is 10MB.
# =============================================================================
> duplicati.commandline.exe help restore
Usage: restore <source url> <target folder>
This will restore one or more files from the backup in <source url> to the local folder <target folder>.
Options:
--file-to-restore = <list of files>
List of files to be restored separated by a semicolon ";" on Windows or colon ":" on Linux.
--restore-time = <date>
Restore from a specific or relative date or time. If nothing is specified, the latest version is restored.
# =============================================================================
> duplicati.commandline.exe help delete-all-but-n-full
Usage: delete-all-but-n-full <number> <source url>
This will keep the <number> latests full backups and delete older ones.
Options:
%OPTION:force%
%OPTION:allow-full-removal%
# =============================================================================
> duplicati.commandline.exe help delete-all-but-n
Usage: delete-all-but-n <number> <target url>
This will keep the <number> latest backups no matter if they are full or incremental. Older backups will be deleted. No backups are deleted that are required to restore files from a valid newer backup.
Options:
%OPTION:force%
%OPTION:allow-full-removal%
# =============================================================================
> duplicati.commandline.exe help delete-older-than
Usage: delete-older-than <date> <target url>
This will delete all backups from the target that older than the specified absolute or relative date and time.
Options:
%OPTION:force%
%OPTION:allow-full-removal%
# =============================================================================
> duplicati.commandline.exe help debug
> duplicati.commandline.exe help logging
Duplicati provides information for debugging and logging purposes. By default, all debugging and logging is turned off.
--debug-output
Error messages are more verbose.
--debug-retry-errors
If something needs to be retried (e.g. upload failed) this will cause an entry in the log file.
--log-file = <path>
The path to the log file e.g. "D:\duplicati\log.txt".
--log-level = Profiling | Information | Warning | Error
Specifies the log level.
--backend-log-database = <path>
Duplicati can log all actions related to storing, deleting files on the backend. <path> specifies where this log is written e.g. "D:\duplicati\backend.xml".
# =============================================================================
> duplicati.commandline.exe help encryption
> duplicati.commandline.exe help compression
Duplicati offers various options for the used compression and encryption modules.
--encryption-module = %ENCRYPTIONMODULES%
The encryption module that is used to encrypt backups. Default is %DEFAULTENCRYPTIONMODULE%.
--compression-module = %COMPRESSIONMODULES%
The compression module that is used. Default is %DEFAULTCOMPRESSIONMODULE%.
--enable-module = %GENERICMODULES%
Enable a built-in generic module that is not enabled by default
--disable-module = %GENERICMODULES%
Disable a built-in generic module that is enabled by default
%OPTION:passphrase%
%OPTION:no-encryption%
# =============================================================================
> duplicati.commandline.exe help gpg
Duplicati is shipped with an interface to GNU Privary Guard. It requires that the gpg executable is available on the system. On Windows it is assumed that this is in the default installation folder under program files, under Linux and OSX it is assumed that the program is available via the PATH environment variable. It is possible to supply the path to GPG using the --gpg-program-path switch.
Options:
%MODULEOPTIONS%
# =============================================================================
> duplicati.commandline.exe help cleanup
Usage: cleanup <target url>
Removes all files that do not belong to the backup (e.g. partial files caused by interrupted uploads). This can also be performed when the actions backup, restore are run with the option --auto-cleanup.
Options:
%OPTION:force%
# =============================================================================
> duplicati.commandline.exe help list
Usage: list <target url>
Lists all files stored on the remote server. These are manifest files, signature files, content files and other files that do not to any backup created by duplicati. This command can be used to see the contents of the remote folder.
# =============================================================================
> duplicati.commandline.exe help list-current-files
Usage: list-current-files <target url>
Lists the (source) files that are contained in a backup. By default, the latest versions are listed. This action is useful to try out what files would be restored with a given set or options.
Options:
--restore-time = <date>
By default, Duplicati will restore files from the most recent backup, use this option to restore older versions of a file. You may use relative times, like "-2M" for a backup from two months ago. Duplicati will pick the next older version of the value specified. If you specify "-2M", the restored version could be 2 months and 3 days old.
# =============================================================================
> duplicati.commandline.exe help list-source-folders
Usage: list-source-folders <target url>
Lists the source folders that have been included in a backup. By default, the source folders of the latest backup are listed. This action is useful to check what source folders had been included in a backup at a given date or time.
Options:
--restore-time = <date>
By default, Duplicati will restore files from the most recent backup, use this option to restore older versions of a file. You may use relative times, like "-2M" for a backup from two months ago. Duplicati will pick the next older version of the value specified. If you specify "-2M", the restored version could be 2 months and 3 days old.
# =============================================================================
> duplicati.commandline.exe help list-actual-signature-files
Usage: list-actual-signature-files <target url>
Lists the files found in a single backup set with a status: (added, modified, deleted). This is the same as a "change set".
Options:
--restore-time = <date>
By default, Duplicati will restore files from the most recent backup, use this option to select another item. You may use relative times, like "-2M" for a backup from two months ago.
# =============================================================================
> duplicati.commandline.exe help file
Duplicati can use the local file system to store backups. The following target URL formats can be used:
file://hostname/folder
file://\\server\folder (UNC path)
file://c:\folder (Windows)
file:///usr/pub/files (Linux)
Options:
%MODULEOPTIONS%
# =============================================================================
> duplicati.commandline.exe help tahoe
> duplicati.commandline.exe help tahoelafs
Duplicati can use the TahoeLAFS to store backups. The following target URL format is used:
tahoe://hostname:port/uri/$DIRCAP
Options:
%MODULEOPTIONS%
# =============================================================================
> duplicati.commandline.exe help ftp
Duplicati can use FTP servers to store backups. The following target URL formats can be used:
ftp://hostname/folder
Options:
%MODULEOPTIONS%
# =============================================================================
> duplicati.commandline.exe help ssh
Duplicati can use SSH servers to store backups. The following target URL formats can be used:
ssh://hostname/folder
Options:
%MODULEOPTIONS%
# =============================================================================
> duplicati.commandline.exe help webdav
Duplicati can use WebDAV servers to store backups. The following target URL formats can be used:
webdav://hostname/folder"
Options:
%MODULEOPTIONS%
# =============================================================================
> duplicati.commandline.exe help s3
Duplicati can use S3-compatible servers to store backups. The following target URL format is used:
s3://bucketname/prefix
Options:
%MODULEOPTIONS%
# =============================================================================
> duplicati.commandline.exe help skydrive
Duplicati can use Windows Live Skydrive to store backups. The following target URL format is used:
skydrive://folder/subfolder
Please note that there is no official API and accessing SkyDrive through this backend may violate the ToS and may stop to work if Microsoft decides to change the API.
Options:
%MODULEOPTIONS%
# =============================================================================
> duplicati.commandline.exe help date
> duplicati.commandline.exe help time
Duplicati supports absolute and relative dates and times:
now --> The current time
1234567890 --> A timestamp, seconds since 1970.
"2009-03-26T08:30:00+01:00" --> An absolute date and time. You can also use the local date and time format of your system like e.g. "01-14-2000" or "01 jan. 2004".
Y, M, D, W, h, m, s --> Relative date and time: year, month, day, week, hour, minute, second. Example: 2M10D5h is now + 2 months + 10 days + 5 hours.
# =============================================================================
> duplicati.commandline.exe help size
Whenever a size is required, you can use any of the following suffixes:
B - Bytes
kB - Kilobytes
MB - Megabytes
GB - Gigabytes
For speed limits, use the same format. If you enter 1MB this will be 1MB/sec.
# =============================================================================
> duplicati.commandline.exe help filter
> duplicati.commandline.exe help filters
Duplicati can apply globbing and regex filter rules to backup and restore specific files only. It can also exclude files that meet specific conditions. It is recommended to check the website for more information how Duplicati processes filter rules. For more information, please visit http://code.google.com/p/duplicati/wiki/FilterUsage
%OPTION:include%
%OPTION:exclude%
%OPTION:include-regexp%
%OPTION:exclude-regexp%
%OPTION:skip-files-larger-than%
# =============================================================================
> duplicati.commandline.exe help collection-status
Usage: collection-status <target url>
Collection status will list all backup chains found on the target, along with the combined size of each volume.
# =============================================================================
> duplicati.commandline.exe help create-folder
Usage: create-folder <target url>
This command can be used to create the folder on the remote backend.
# =============================================================================
> duplicati.commandline.exe help find-last-version
Usage: find-last-version <target url> --file-to-restore=%EXAMPLE_SOURCE_FILE%
This command finds the last backup set that contains a specified file. This can be used to locate the last backup of a file that has been deleted.
# =============================================================================
> duplicati.commandline.exe help verify
Usage: verify <target url> --verification-level=manifest
Duplicati will check the integrity of a remote backup. Therefore, it will download backup files and check their integrity locally. Default behaviour is, that only the manifest files required to restore the latest version of the backup are checked. Using the below listed options, it is possible to also check signature and content files. It is also possible to check older versions of a backup. Please note that this command might download a lot of data!
Options:
--verification-level = Manifest | Signature | Full
Defines what files are downloaded and checked.
Manifest --> manifest files
Signature --> manifest + signature files
Full --> manifest + signature + content files
--restore-time = <date>
Select another version of the backup that is older than the specified absolute or relative date.
# =============================================================================
> duplicati.commandline.exe help advanced
> duplicati.commandline.exe help option
> duplicati.commandline.exe help options
Duplicati offers more options than listed in the other topics. Those additional options should only be used with care. For normal operation none of them should ever be required. Here is a complete list of options supported by Duplicati:
%MAINOPTIONS%
+77 -107
View File
@@ -35,11 +35,9 @@ namespace Duplicati.GUI
this.BalloonNotificationLevel = new System.Windows.Forms.ComboBox();
this.label8 = new System.Windows.Forms.Label();
this.HideDonateButton = new System.Windows.Forms.CheckBox();
this.StartupDelayDuration = new Duplicati.GUI.HelperControls.DurationEditor();
this.label7 = new System.Windows.Forms.Label();
this.LanguageSelection = new System.Windows.Forms.ComboBox();
this.label3 = new System.Windows.Forms.Label();
this.RecentDuration = new Duplicati.GUI.HelperControls.DurationEditor();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.CacheSizeLabel = new System.Windows.Forms.Label();
this.ClearCacheButton = new System.Windows.Forms.Button();
@@ -49,42 +47,39 @@ namespace Duplicati.GUI
this.TempPathBrowse = new System.Windows.Forms.Button();
this.TempPath = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.OKBtn = new System.Windows.Forms.Button();
this.CancelBtn = new System.Windows.Forms.Button();
this.BrowseTempPath = new System.Windows.Forms.FolderBrowserDialog();
this.PasswordDefaultsGroup = new System.Windows.Forms.GroupBox();
this.PasswordPanel = new System.Windows.Forms.Panel();
this.EncryptionModule = new System.Windows.Forms.ComboBox();
this.EncryptionMethod = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.CommonPassword = new Duplicati.Winforms.Controls.PasswordControl();
this.EncryptionModule = new System.Windows.Forms.ComboBox();
this.UseCommonPassword = new System.Windows.Forms.CheckBox();
this.CommonPassword = new Duplicati.Winforms.Controls.PasswordControl();
this.BrowseSignatureCachePath = new System.Windows.Forms.FolderBrowserDialog();
this.CacheSizeCalculator = new System.ComponentModel.BackgroundWorker();
this.TabContainer = new System.Windows.Forms.TabControl();
this.BasicTab = new System.Windows.Forms.TabPage();
this.AdvancedTab = new System.Windows.Forms.TabPage();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.Bandwidth = new Duplicati.GUI.HelperControls.BandwidthLimit();
this.ThreadPriorityPicker = new Duplicati.GUI.HelperControls.ThreadPriorityPicker();
this.LicenseTab = new System.Windows.Forms.TabPage();
this.LicenseLink = new System.Windows.Forms.LinkLabel();
this.label6 = new System.Windows.Forms.Label();
this.LicenseText = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.LicenseSections = new System.Windows.Forms.ListBox();
this.panel1 = new System.Windows.Forms.Panel();
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
this.OKBtn = new System.Windows.Forms.Button();
this.CancelBtn = new System.Windows.Forms.Button();
this.StartupDelayDuration = new Duplicati.GUI.HelperControls.DurationEditor();
this.RecentDuration = new Duplicati.GUI.HelperControls.DurationEditor();
this.Bandwidth = new Duplicati.GUI.HelperControls.BandwidthLimit();
this.ThreadPriorityPicker = new Duplicati.GUI.HelperControls.ThreadPriorityPicker();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.PasswordDefaultsGroup.SuspendLayout();
this.PasswordPanel.SuspendLayout();
this.TabContainer.SuspendLayout();
this.BasicTab.SuspendLayout();
this.AdvancedTab.SuspendLayout();
this.groupBox4.SuspendLayout();
this.LicenseTab.SuspendLayout();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// label1
@@ -107,6 +102,7 @@ namespace Duplicati.GUI
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false;
this.groupBox1.Enter += new System.EventHandler(this.groupBox1_Enter);
//
// BalloonNotificationLevel
//
@@ -127,18 +123,9 @@ namespace Duplicati.GUI
//
resources.ApplyResources(this.HideDonateButton, "HideDonateButton");
this.HideDonateButton.Name = "HideDonateButton";
this.toolTip.SetToolTip(this.HideDonateButton, resources.GetString("HideDonateButton.ToolTip"));
this.HideDonateButton.UseVisualStyleBackColor = true;
this.HideDonateButton.CheckedChanged += new System.EventHandler(this.HideDonateButton_CheckedChanged);
//
// StartupDelayDuration
//
resources.ApplyResources(this.StartupDelayDuration, "StartupDelayDuration");
this.StartupDelayDuration.Name = "StartupDelayDuration";
this.toolTip.SetToolTip(this.StartupDelayDuration, resources.GetString("StartupDelayDuration.ToolTip"));
this.StartupDelayDuration.Value = "";
this.StartupDelayDuration.ValueChanged += new System.EventHandler(this.StartupDelayDuration_ValueChanged);
//
// label7
//
resources.ApplyResources(this.label7, "label7");
@@ -160,14 +147,6 @@ namespace Duplicati.GUI
this.label3.Name = "label3";
this.toolTip.SetToolTip(this.label3, resources.GetString("label3.ToolTip"));
//
// RecentDuration
//
resources.ApplyResources(this.RecentDuration, "RecentDuration");
this.RecentDuration.Name = "RecentDuration";
this.toolTip.SetToolTip(this.RecentDuration, resources.GetString("RecentDuration.ToolTip"));
this.RecentDuration.Value = "";
this.RecentDuration.ValueChanged += new System.EventHandler(this.RecentDuration_ValueChanged);
//
// groupBox2
//
this.groupBox2.Controls.Add(this.CacheSizeLabel);
@@ -186,7 +165,6 @@ namespace Duplicati.GUI
//
resources.ApplyResources(this.CacheSizeLabel, "CacheSizeLabel");
this.CacheSizeLabel.Name = "CacheSizeLabel";
this.toolTip.SetToolTip(this.CacheSizeLabel, resources.GetString("CacheSizeLabel.ToolTip"));
//
// ClearCacheButton
//
@@ -237,38 +215,22 @@ namespace Duplicati.GUI
//
resources.ApplyResources(this.label4, "label4");
this.label4.Name = "label4";
this.toolTip.SetToolTip(this.label4, resources.GetString("label4.ToolTip"));
//
// OKBtn
//
resources.ApplyResources(this.OKBtn, "OKBtn");
this.OKBtn.Name = "OKBtn";
this.OKBtn.UseVisualStyleBackColor = true;
this.OKBtn.Click += new System.EventHandler(this.OKBtn_Click);
//
// CancelBtn
//
resources.ApplyResources(this.CancelBtn, "CancelBtn");
this.CancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.CancelBtn.Name = "CancelBtn";
this.CancelBtn.UseVisualStyleBackColor = true;
//
// PasswordDefaultsGroup
//
this.PasswordDefaultsGroup.Controls.Add(this.PasswordPanel);
this.PasswordDefaultsGroup.Controls.Add(this.EncryptionMethod);
this.PasswordDefaultsGroup.Controls.Add(this.EncryptionModule);
this.PasswordDefaultsGroup.Controls.Add(this.UseCommonPassword);
this.PasswordDefaultsGroup.Controls.Add(this.CommonPassword);
resources.ApplyResources(this.PasswordDefaultsGroup, "PasswordDefaultsGroup");
this.PasswordDefaultsGroup.Name = "PasswordDefaultsGroup";
this.PasswordDefaultsGroup.TabStop = false;
//
// PasswordPanel
// EncryptionMethod
//
this.PasswordPanel.Controls.Add(this.EncryptionModule);
this.PasswordPanel.Controls.Add(this.EncryptionMethod);
this.PasswordPanel.Controls.Add(this.label5);
this.PasswordPanel.Controls.Add(this.CommonPassword);
resources.ApplyResources(this.PasswordPanel, "PasswordPanel");
this.PasswordPanel.Name = "PasswordPanel";
resources.ApplyResources(this.EncryptionMethod, "EncryptionMethod");
this.EncryptionMethod.Name = "EncryptionMethod";
this.toolTip.SetToolTip(this.EncryptionMethod, resources.GetString("EncryptionMethod.ToolTip"));
//
// EncryptionModule
//
@@ -280,17 +242,13 @@ namespace Duplicati.GUI
this.EncryptionModule.SelectedIndexChanged += new System.EventHandler(this.EncryptionModule_SelectedIndexChanged);
this.EncryptionModule.TextChanged += new System.EventHandler(this.EncryptionModule_SelectedIndexChanged);
//
// EncryptionMethod
// UseCommonPassword
//
resources.ApplyResources(this.EncryptionMethod, "EncryptionMethod");
this.EncryptionMethod.Name = "EncryptionMethod";
this.toolTip.SetToolTip(this.EncryptionMethod, resources.GetString("EncryptionMethod.ToolTip"));
//
// label5
//
resources.ApplyResources(this.label5, "label5");
this.label5.Name = "label5";
this.toolTip.SetToolTip(this.label5, resources.GetString("label5.ToolTip"));
resources.ApplyResources(this.UseCommonPassword, "UseCommonPassword");
this.UseCommonPassword.Name = "UseCommonPassword";
this.toolTip.SetToolTip(this.UseCommonPassword, resources.GetString("UseCommonPassword.ToolTip"));
this.UseCommonPassword.UseVisualStyleBackColor = true;
this.UseCommonPassword.CheckedChanged += new System.EventHandler(this.UseCommonPassword_CheckedChanged);
//
// CommonPassword
//
@@ -304,14 +262,6 @@ namespace Duplicati.GUI
this.toolTip.SetToolTip(this.CommonPassword, resources.GetString("CommonPassword.ToolTip"));
this.CommonPassword.TextChanged += new System.EventHandler(this.CommonPassword_TextChanged);
//
// UseCommonPassword
//
resources.ApplyResources(this.UseCommonPassword, "UseCommonPassword");
this.UseCommonPassword.Name = "UseCommonPassword";
this.toolTip.SetToolTip(this.UseCommonPassword, resources.GetString("UseCommonPassword.ToolTip"));
this.UseCommonPassword.UseVisualStyleBackColor = true;
this.UseCommonPassword.CheckedChanged += new System.EventHandler(this.UseCommonPassword_CheckedChanged);
//
// CacheSizeCalculator
//
this.CacheSizeCalculator.WorkerSupportsCancellation = true;
@@ -326,6 +276,7 @@ namespace Duplicati.GUI
resources.ApplyResources(this.TabContainer, "TabContainer");
this.TabContainer.Name = "TabContainer";
this.TabContainer.SelectedIndex = 0;
this.TabContainer.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
//
// BasicTab
//
@@ -351,25 +302,6 @@ namespace Duplicati.GUI
this.groupBox4.Name = "groupBox4";
this.groupBox4.TabStop = false;
//
// Bandwidth
//
this.Bandwidth.DownloadLimit = null;
this.Bandwidth.DownloadLimitInBytes = ((long)(0));
resources.ApplyResources(this.Bandwidth, "Bandwidth");
this.Bandwidth.Name = "Bandwidth";
this.toolTip.SetToolTip(this.Bandwidth, resources.GetString("Bandwidth.ToolTip"));
this.Bandwidth.UploadLimit = null;
this.Bandwidth.UploadLimitInBytes = ((long)(0));
this.Bandwidth.DownloadLimitChanged += new System.EventHandler(this.Bandwidth_DownloadLimitChanged);
this.Bandwidth.UploadLimitChanged += new System.EventHandler(this.Bandwidth_UploadLimitChanged);
//
// ThreadPriorityPicker
//
resources.ApplyResources(this.ThreadPriorityPicker, "ThreadPriorityPicker");
this.ThreadPriorityPicker.Name = "ThreadPriorityPicker";
this.toolTip.SetToolTip(this.ThreadPriorityPicker, resources.GetString("ThreadPriorityPicker.ToolTip"));
this.ThreadPriorityPicker.SelectedPriorityChanged += new System.EventHandler(this.ThreadPriorityPicker_SelectedPriorityChanged);
//
// LicenseTab
//
this.LicenseTab.Controls.Add(this.LicenseLink);
@@ -396,6 +328,7 @@ namespace Duplicati.GUI
//
// LicenseText
//
this.LicenseText.BackColor = System.Drawing.SystemColors.Window;
resources.ApplyResources(this.LicenseText, "LicenseText");
this.LicenseText.Name = "LicenseText";
this.LicenseText.ReadOnly = true;
@@ -413,41 +346,81 @@ namespace Duplicati.GUI
this.toolTip.SetToolTip(this.LicenseSections, resources.GetString("LicenseSections.ToolTip"));
this.LicenseSections.SelectedIndexChanged += new System.EventHandler(this.LicenseSections_SelectedIndexChanged);
//
// panel1
// OKBtn
//
this.panel1.Controls.Add(this.OKBtn);
this.panel1.Controls.Add(this.CancelBtn);
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Name = "panel1";
resources.ApplyResources(this.OKBtn, "OKBtn");
this.OKBtn.Name = "OKBtn";
this.OKBtn.UseVisualStyleBackColor = true;
this.OKBtn.Click += new System.EventHandler(this.OKBtn_Click);
//
// CancelBtn
//
resources.ApplyResources(this.CancelBtn, "CancelBtn");
this.CancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.CancelBtn.Name = "CancelBtn";
this.CancelBtn.UseVisualStyleBackColor = true;
//
// StartupDelayDuration
//
resources.ApplyResources(this.StartupDelayDuration, "StartupDelayDuration");
this.StartupDelayDuration.Name = "StartupDelayDuration";
this.toolTip.SetToolTip(this.StartupDelayDuration, resources.GetString("StartupDelayDuration.ToolTip"));
this.StartupDelayDuration.Value = "";
this.StartupDelayDuration.ValueChanged += new System.EventHandler(this.StartupDelayDuration_ValueChanged);
//
// RecentDuration
//
resources.ApplyResources(this.RecentDuration, "RecentDuration");
this.RecentDuration.Name = "RecentDuration";
this.toolTip.SetToolTip(this.RecentDuration, resources.GetString("RecentDuration.ToolTip"));
this.RecentDuration.Value = "";
this.RecentDuration.ValueChanged += new System.EventHandler(this.RecentDuration_ValueChanged);
//
// Bandwidth
//
this.Bandwidth.DownloadLimit = null;
this.Bandwidth.DownloadLimitInBytes = ((long)(0));
resources.ApplyResources(this.Bandwidth, "Bandwidth");
this.Bandwidth.Name = "Bandwidth";
this.toolTip.SetToolTip(this.Bandwidth, resources.GetString("Bandwidth.ToolTip"));
this.Bandwidth.UploadLimit = null;
this.Bandwidth.UploadLimitInBytes = ((long)(0));
this.Bandwidth.DownloadLimitChanged += new System.EventHandler(this.Bandwidth_DownloadLimitChanged);
this.Bandwidth.UploadLimitChanged += new System.EventHandler(this.Bandwidth_UploadLimitChanged);
//
// ThreadPriorityPicker
//
resources.ApplyResources(this.ThreadPriorityPicker, "ThreadPriorityPicker");
this.ThreadPriorityPicker.Name = "ThreadPriorityPicker";
this.toolTip.SetToolTip(this.ThreadPriorityPicker, resources.GetString("ThreadPriorityPicker.ToolTip"));
this.ThreadPriorityPicker.SelectedPriorityChanged += new System.EventHandler(this.ThreadPriorityPicker_SelectedPriorityChanged);
//
// ApplicationSetup
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.CancelBtn;
this.Controls.Add(this.CancelBtn);
this.Controls.Add(this.OKBtn);
this.Controls.Add(this.TabContainer);
this.Controls.Add(this.panel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ApplicationSetup";
this.Load += new System.EventHandler(this.ApplicationSetup_Load);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ApplicationSetup_FormClosing);
this.Load += new System.EventHandler(this.ApplicationSetup_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.PasswordDefaultsGroup.ResumeLayout(false);
this.PasswordDefaultsGroup.PerformLayout();
this.PasswordPanel.ResumeLayout(false);
this.PasswordPanel.PerformLayout();
this.TabContainer.ResumeLayout(false);
this.BasicTab.ResumeLayout(false);
this.AdvancedTab.ResumeLayout(false);
this.groupBox4.ResumeLayout(false);
this.LicenseTab.ResumeLayout(false);
this.LicenseTab.PerformLayout();
this.panel1.ResumeLayout(false);
this.ResumeLayout(false);
}
@@ -457,8 +430,6 @@ namespace Duplicati.GUI
private System.Windows.Forms.Label label1;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Button OKBtn;
private System.Windows.Forms.Button CancelBtn;
private Duplicati.GUI.HelperControls.DurationEditor RecentDuration;
private System.Windows.Forms.Button TempPathBrowse;
private System.Windows.Forms.TextBox TempPath;
@@ -467,8 +438,6 @@ namespace Duplicati.GUI
private System.Windows.Forms.GroupBox PasswordDefaultsGroup;
private Duplicati.Winforms.Controls.PasswordControl CommonPassword;
private System.Windows.Forms.CheckBox UseCommonPassword;
private System.Windows.Forms.Panel PasswordPanel;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.CheckBox SignatureCacheEnabled;
private System.Windows.Forms.Button SignatureCachePathBrowse;
private System.Windows.Forms.TextBox SignatureCachePath;
@@ -486,7 +455,6 @@ namespace Duplicati.GUI
private System.Windows.Forms.GroupBox groupBox4;
private Duplicati.GUI.HelperControls.BandwidthLimit Bandwidth;
private Duplicati.GUI.HelperControls.ThreadPriorityPicker ThreadPriorityPicker;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label EncryptionMethod;
private System.Windows.Forms.ComboBox EncryptionModule;
private System.Windows.Forms.CheckBox HideDonateButton;
@@ -499,5 +467,7 @@ namespace Duplicati.GUI
private System.Windows.Forms.TextBox LicenseText;
private System.Windows.Forms.ComboBox BalloonNotificationLevel;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Button OKBtn;
private System.Windows.Forms.Button CancelBtn;
}
}
}
+19 -2
View File
@@ -124,6 +124,12 @@ namespace Duplicati.GUI
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
Font = SystemFonts.MessageBoxFont;
}
private void RecentDuration_TextChanged(object sender, EventArgs e)
{
if (m_isUpdating || m_settings == null)
@@ -324,7 +330,8 @@ namespace Duplicati.GUI
private void UseCommonPassword_CheckedChanged(object sender, EventArgs e)
{
PasswordPanel.Enabled = UseCommonPassword.Checked;
CommonPassword.Enabled = UseCommonPassword.Checked;
EncryptionModule.Enabled = UseCommonPassword.Checked;
if (m_isUpdating)
return;
@@ -561,5 +568,15 @@ namespace Duplicati.GUI
if (BalloonNotificationLevel.SelectedItem as ComboBoxItemPair<ApplicationSettings.NotificationLevel> != null)
m_settings.BallonNotificationLevel = (BalloonNotificationLevel.SelectedItem as ComboBoxItemPair<ApplicationSettings.NotificationLevel>).Value;
}
private void groupBox1_Enter(object sender, EventArgs e)
{
}
private void panel1_Paint(object sender, PaintEventArgs e)
{
}
}
}
}
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -4,7 +4,7 @@
<MaxFullBackups>4</MaxFullBackups>
<BackupExpireInterval></BackupExpireInterval>
<RepeatInterval>1D</RepeatInterval>
<VolumeSize>10MB</VolumeSize>
<VolumeSize>10mb</VolumeSize>
<BackupTimeOffset>13h</BackupTimeOffset>
<EncodedFilters>e:.*\\Thumbs.db</EncodedFilters>
<IncludeSetup>true</IncludeSetup>
+32 -10
View File
@@ -95,6 +95,21 @@ namespace Duplicati.Datamodel
get { return string.IsNullOrEmpty(m_appset[RECENT_DURATION]) ? "2W" : m_appset[RECENT_DURATION]; }
set { m_appset[RECENT_DURATION] = value; }
}
/// <summary>
/// Returns the default Duplicati temp path
/// </summary>
public static string DefaultTempPath
{
get
{
#if DEBUG
return System.IO.Path.Combine(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), "TEMP");
#else
return System.IO.Path.GetTempPath();
#endif
}
}
/// <summary>
/// Gets or sets the path to store temporary files. May contain environment variables
@@ -105,11 +120,7 @@ namespace Duplicati.Datamodel
{
if (string.IsNullOrEmpty(m_appset[TEMP_PATH]))
{
#if DEBUG
return System.IO.Path.Combine(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), "TEMP");
#else
return System.IO.Path.GetTempPath();
#endif
return DefaultTempPath;
}
else
return m_appset[TEMP_PATH];
@@ -163,7 +174,21 @@ namespace Duplicati.Datamodel
}
set { m_appset[COMMON_PASSWORD] = value; }
}
/// <summary>
/// Returns the default Duplicati signature cache path
/// </summary>
public static string DefaultSignatureCachePath
{
get
{
if (Duplicati.Library.Utility.Utility.IsClientLinux)
return System.IO.Path.Combine(Environment.ExpandEnvironmentVariables("%DUPLICATI_HOME%").TrimStart('"').TrimEnd('"'), "Signature Cache");
else
return System.IO.Path.Combine(System.IO.Path.Combine(Environment.ExpandEnvironmentVariables(System.Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)), "Duplicati"), "Signature Cache");
}
}
/// <summary>
/// Gets or sets the path to store signature cache files. May contain environment variables
/// </summary>
@@ -173,10 +198,7 @@ namespace Duplicati.Datamodel
{
if (string.IsNullOrEmpty(m_appset[SIGNATURE_CACHE_PATH]))
{
if (Duplicati.Library.Utility.Utility.IsClientLinux)
return System.IO.Path.Combine(Environment.ExpandEnvironmentVariables("%DUPLICATI_HOME%").TrimStart('"').TrimEnd('"'), "Signature Cache");
else
return System.IO.Path.Combine(System.IO.Path.Combine(Environment.ExpandEnvironmentVariables(System.Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)), "Duplicati"), "Signature Cache");
return DefaultSignatureCachePath;
}
else
return m_appset[SIGNATURE_CACHE_PATH];
+3
View File
@@ -229,6 +229,7 @@
</EmbeddedResource>
<EmbeddedResource Include="HelperControls\TestSearchSelection.resx">
<DependentUpon>TestSearchSelection.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
@@ -890,6 +891,7 @@
<EmbeddedResource Include="HelperControls\Strings\SizeSelector.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>SizeSelector.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="HelperControls\ThreadPriorityPicker.resx">
<DependentUpon>ThreadPriorityPicker.cs</DependentUpon>
@@ -1068,6 +1070,7 @@
<EmbeddedResource Include="Strings\WizardHandler.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>WizardHandler.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
+22 -2
View File
@@ -194,9 +194,29 @@ namespace Duplicati.GUI.HelperControls
//At this point the folders are named 0..n if there are multiple
if (m_sourcefolders.Count > 1)
{
m_rootnodes = new TreeNode[treeView.Nodes.Count];
m_rootnodes = new TreeNode[m_sourcefolders.Count];
foreach (TreeNode tn in treeView.Nodes)
m_rootnodes[int.Parse(tn.Text)] = tn;
{
int ix;
if (!int.TryParse(tn.Text, out ix))
ix = -1;
if (ix < 0 || ix >= m_rootnodes.Length)
{
//TODO: Translate
MessageBox.Show(this, string.Format("A source folder with index {0} ({1}) was found, but the list of source folders have the following {2} entries: {3}{4}", ix, tn.Text, m_sourcefolders.Count, Environment.NewLine, string.Join(Environment.NewLine, m_sourcefolders.ToArray())), "Internal Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else
m_rootnodes[ix] = tn;
}
for (int i = 0; i < m_rootnodes.Length; i++)
if (m_rootnodes[i] == null)
{
TreeNode tn = new TreeNode(i.ToString());
treeView.Nodes.Add(tn);
m_rootnodes[i] = tn;
}
}
//This call updates the names of the nodes to fit their source/target
@@ -127,7 +127,7 @@
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="DownloadLimitCheckbox.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 32</value>
<value>0, 30</value>
</data>
<data name="DownloadLimitCheckbox.Size" type="System.Drawing.Size, System.Drawing">
<value>135, 17</value>
@@ -157,7 +157,7 @@
<value>NoControl</value>
</data>
<data name="UploadLimitCheckbox.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
<value>0, 2</value>
</data>
<data name="UploadLimitCheckbox.Size" type="System.Drawing.Size, System.Drawing">
<value>125, 17</value>
@@ -214,7 +214,7 @@
<value>False</value>
</data>
<data name="DownloadLimitPicker.Location" type="System.Drawing.Point, System.Drawing">
<value>152, 32</value>
<value>152, 28</value>
</data>
<data name="DownloadLimitPicker.Size" type="System.Drawing.Size, System.Drawing">
<value>170, 21</value>
@@ -241,7 +241,7 @@
<value>6, 13</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>321, 54</value>
<value>321, 50</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>BandwidthLimit</value>
+1
View File
@@ -53,6 +53,7 @@ namespace Duplicati.GUI.HelperControls
// CustomDuration
//
this.errorProvider.SetError(this.CustomDuration, resources.GetString("CustomDuration.Error"));
this.errorProvider.SetIconPadding(this.CustomDuration, ((int)(resources.GetObject("CustomDuration.IconPadding"))));
resources.ApplyResources(this.CustomDuration, "CustomDuration");
this.CustomDuration.Name = "CustomDuration";
this.CustomDuration.TextChanged += new System.EventHandler(this.CustomDuration_TextChanged);
@@ -182,11 +182,14 @@
<data name="CustomDuration.Error" xml:space="preserve">
<value>s</value>
</data>
<data name="CustomDuration.IconPadding" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="CustomDuration.Location" type="System.Drawing.Point, System.Drawing">
<value>136, 0</value>
<value>118, 0</value>
</data>
<data name="CustomDuration.Size" type="System.Drawing.Size, System.Drawing">
<value>84, 20</value>
<value>102, 20</value>
</data>
<data name="CustomDuration.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
@@ -145,7 +145,7 @@
<value>Top, Left, Right</value>
</data>
<data name="Number.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
<value>0, 1</value>
</data>
<data name="Number.Size" type="System.Drawing.Size, System.Drawing">
<value>88, 20</value>
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.237
// Runtime Version:4.0.30319.235
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -79,7 +79,7 @@ namespace Duplicati.GUI.HelperControls.Strings {
}
/// <summary>
/// Looks up a localized string similar to gb.
/// Looks up a localized string similar to GB.
/// </summary>
internal static string GBName {
get {
@@ -88,7 +88,7 @@ namespace Duplicati.GUI.HelperControls.Strings {
}
/// <summary>
/// Looks up a localized string similar to gb/s.
/// Looks up a localized string similar to GB/s.
/// </summary>
internal static string GBPerSecond {
get {
@@ -97,7 +97,7 @@ namespace Duplicati.GUI.HelperControls.Strings {
}
/// <summary>
/// Looks up a localized string similar to kb.
/// Looks up a localized string similar to kB.
/// </summary>
internal static string KBName {
get {
@@ -106,7 +106,7 @@ namespace Duplicati.GUI.HelperControls.Strings {
}
/// <summary>
/// Looks up a localized string similar to kb/s.
/// Looks up a localized string similar to kB/s.
/// </summary>
internal static string KBPerSecond {
get {
@@ -115,7 +115,7 @@ namespace Duplicati.GUI.HelperControls.Strings {
}
/// <summary>
/// Looks up a localized string similar to mb.
/// Looks up a localized string similar to MB.
/// </summary>
internal static string MBName {
get {
@@ -124,7 +124,7 @@ namespace Duplicati.GUI.HelperControls.Strings {
}
/// <summary>
/// Looks up a localized string similar to mb/s.
/// Looks up a localized string similar to MB/s.
/// </summary>
internal static string MBPerSecond {
get {
@@ -124,21 +124,21 @@
<value>bytes/s</value>
</data>
<data name="GBName" xml:space="preserve">
<value>gb</value>
<value>GB</value>
</data>
<data name="GBPerSecond" xml:space="preserve">
<value>gb/s</value>
<value>GB/s</value>
</data>
<data name="KBName" xml:space="preserve">
<value>kb</value>
<value>kB</value>
</data>
<data name="KBPerSecond" xml:space="preserve">
<value>kb/s</value>
<value>kB/s</value>
</data>
<data name="MBName" xml:space="preserve">
<value>mb</value>
<value>MB</value>
</data>
<data name="MBPerSecond" xml:space="preserve">
<value>mb/s</value>
<value>MB/s</value>
</data>
</root>
</root>
+40 -113
View File
@@ -33,10 +33,10 @@ namespace Duplicati.GUI.HelperControls {
this.miIncludeFileName = new System.Windows.Forms.ToolStripMenuItem();
this.miIncludeFileExt = new System.Windows.Forms.ToolStripMenuItem();
this.miIncludeFilePath = new System.Windows.Forms.ToolStripMenuItem();
this.miExlude = new System.Windows.Forms.ToolStripMenuItem();
this.miExclude = new System.Windows.Forms.ToolStripMenuItem();
this.miExcludeFileName = new System.Windows.Forms.ToolStripMenuItem();
this.miExcludeFileExt = new System.Windows.Forms.ToolStripMenuItem();
this.miExludeFilePath = new System.Windows.Forms.ToolStripMenuItem();
this.miExcludeFilePath = new System.Windows.Forms.ToolStripMenuItem();
this.imageList = new System.Windows.Forms.ImageList(this.components);
this.label1 = new System.Windows.Forms.Label();
this.btnCancel = new System.Windows.Forms.Button();
@@ -67,9 +67,9 @@ namespace Duplicati.GUI.HelperControls {
//
this.ctxSelection.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.miInclude,
this.miExlude});
this.miExclude});
this.ctxSelection.Name = "ctxSelection";
this.ctxSelection.Size = new System.Drawing.Size(110, 48);
resources.ApplyResources(this.ctxSelection, "ctxSelection");
this.ctxSelection.Opened += new System.EventHandler(this.ctxSelection_Opened);
//
// miInclude
@@ -79,60 +79,52 @@ namespace Duplicati.GUI.HelperControls {
this.miIncludeFileExt,
this.miIncludeFilePath});
this.miInclude.Name = "miInclude";
this.miInclude.Size = new System.Drawing.Size(109, 22);
this.miInclude.Text = "Include";
resources.ApplyResources(this.miInclude, "miInclude");
//
// miIncludeFileName
//
this.miIncludeFileName.Name = "miIncludeFileName";
this.miIncludeFileName.Size = new System.Drawing.Size(195, 22);
resources.ApplyResources(this.miIncludeFileName, "miIncludeFileName");
this.miIncludeFileName.Tag = "1";
this.miIncludeFileName.Text = "Add filename filer";
this.miIncludeFileName.Click += new System.EventHandler(this.miIncludeFileName_Click);
//
// miIncludeFileExt
//
this.miIncludeFileExt.Name = "miIncludeFileExt";
this.miIncludeFileExt.Size = new System.Drawing.Size(195, 22);
this.miIncludeFileExt.Text = "Add file extension filter";
resources.ApplyResources(this.miIncludeFileExt, "miIncludeFileExt");
this.miIncludeFileExt.Click += new System.EventHandler(this.miIncludeFileExt_Click);
//
// miIncludeFilePath
//
this.miIncludeFilePath.Name = "miIncludeFilePath";
this.miIncludeFilePath.Size = new System.Drawing.Size(195, 22);
this.miIncludeFilePath.Text = "File path";
resources.ApplyResources(this.miIncludeFilePath, "miIncludeFilePath");
//
// miExlude
// miExclude
//
this.miExlude.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.miExclude.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.miExcludeFileName,
this.miExcludeFileExt,
this.miExludeFilePath});
this.miExlude.Name = "miExlude";
this.miExlude.Size = new System.Drawing.Size(109, 22);
this.miExlude.Text = "Exlude";
this.miExcludeFilePath});
this.miExclude.Name = "miExclude";
resources.ApplyResources(this.miExclude, "miExclude");
//
// miExcludeFileName
//
this.miExcludeFileName.Name = "miExcludeFileName";
this.miExcludeFileName.Size = new System.Drawing.Size(195, 22);
this.miExcludeFileName.Text = "Add filename filter";
resources.ApplyResources(this.miExcludeFileName, "miExcludeFileName");
this.miExcludeFileName.Click += new System.EventHandler(this.addFilenameFilterToolStripMenuItem_Click);
//
// miExcludeFileExt
//
this.miExcludeFileExt.Name = "miExcludeFileExt";
this.miExcludeFileExt.Size = new System.Drawing.Size(195, 22);
this.miExcludeFileExt.Text = "Add file extension filter";
resources.ApplyResources(this.miExcludeFileExt, "miExcludeFileExt");
this.miExcludeFileExt.Click += new System.EventHandler(this.addFileExtensionFilterToolStripMenuItem1_Click);
//
// miExludeFilePath
// miExcludeFilePath
//
this.miExludeFilePath.Name = "miExludeFilePath";
this.miExludeFilePath.Size = new System.Drawing.Size(195, 22);
this.miExludeFilePath.Text = "File Path";
this.miExludeFilePath.Click += new System.EventHandler(this.addFilePathFilerToolStripMenuItem_Click);
this.miExcludeFilePath.Name = "miExcludeFilePath";
resources.ApplyResources(this.miExcludeFilePath, "miExcludeFilePath");
this.miExcludeFilePath.Click += new System.EventHandler(this.addFilePathFilerToolStripMenuItem_Click);
//
// imageList
//
@@ -151,48 +143,30 @@ namespace Duplicati.GUI.HelperControls {
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(9, 272);
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(37, 13);
this.label1.TabIndex = 2;
this.label1.Text = "Filters:";
//
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
resources.ApplyResources(this.btnCancel, "btnCancel");
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Location = new System.Drawing.Point(397, 418);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(75, 23);
this.btnCancel.TabIndex = 3;
this.btnCancel.Text = "Cancel";
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.btnClose_Click);
//
// label2
//
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label2.AutoSize = true;
resources.ApplyResources(this.label2, "label2");
this.label2.ForeColor = System.Drawing.Color.DimGray;
this.label2.Location = new System.Drawing.Point(12, 242);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(212, 13);
this.label2.TabIndex = 4;
this.label2.Text = "Use context menu to add and remove filters";
//
// lvFilters
//
this.lvFilters.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
resources.ApplyResources(this.lvFilters, "lvFilters");
this.lvFilters.ContextMenuStrip = this.ctxFilters;
this.lvFilters.FullRowSelect = true;
this.lvFilters.Location = new System.Drawing.Point(12, 289);
this.lvFilters.Name = "lvFilters";
this.lvFilters.Size = new System.Drawing.Size(461, 123);
this.lvFilters.SmallImageList = this.imageList;
this.lvFilters.TabIndex = 5;
this.lvFilters.UseCompatibleStateImageBehavior = false;
this.lvFilters.View = System.Windows.Forms.View.List;
//
@@ -201,13 +175,12 @@ namespace Duplicati.GUI.HelperControls {
this.ctxFilters.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.removeFilterToolStripMenuItem});
this.ctxFilters.Name = "ctxFilters";
this.ctxFilters.Size = new System.Drawing.Size(147, 26);
resources.ApplyResources(this.ctxFilters, "ctxFilters");
//
// removeFilterToolStripMenuItem
//
this.removeFilterToolStripMenuItem.Name = "removeFilterToolStripMenuItem";
this.removeFilterToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
this.removeFilterToolStripMenuItem.Text = "Remove Filter";
resources.ApplyResources(this.removeFilterToolStripMenuItem, "removeFilterToolStripMenuItem");
this.removeFilterToolStripMenuItem.Click += new System.EventHandler(this.removeFilterToolStripMenuItem_Click);
//
// scanWorker
@@ -218,60 +191,37 @@ namespace Duplicati.GUI.HelperControls {
//
// lbTotalSize
//
this.lbTotalSize.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.lbTotalSize.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
this.lbTotalSize.Location = new System.Drawing.Point(324, 242);
resources.ApplyResources(this.lbTotalSize, "lbTotalSize");
this.lbTotalSize.Name = "lbTotalSize";
this.lbTotalSize.Size = new System.Drawing.Size(148, 18);
this.lbTotalSize.TabIndex = 11;
this.lbTotalSize.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(12, 11);
resources.ApplyResources(this.label3, "label3");
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(101, 13);
this.label3.TabIndex = 12;
this.label3.Text = "Files to be included:";
//
// tbSearch
//
this.tbSearch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.tbSearch.Location = new System.Drawing.Point(321, 4);
resources.ApplyResources(this.tbSearch, "tbSearch");
this.tbSearch.Name = "tbSearch";
this.tbSearch.Size = new System.Drawing.Size(156, 20);
this.tbSearch.TabIndex = 13;
this.tbSearch.TextChanged += new System.EventHandler(this.tbSearch_TextChanged);
//
// btnSearch
//
this.btnSearch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnSearch.Image = ((System.Drawing.Image)(resources.GetObject("btnSearch.Image")));
this.btnSearch.Location = new System.Drawing.Point(291, 1);
resources.ApplyResources(this.btnSearch, "btnSearch");
this.btnSearch.Name = "btnSearch";
this.btnSearch.Size = new System.Drawing.Size(25, 25);
this.btnSearch.TabIndex = 14;
this.btnSearch.TabStop = false;
//
// btnClearSearch
//
this.btnClearSearch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
resources.ApplyResources(this.btnClearSearch, "btnClearSearch");
this.btnClearSearch.BackColor = System.Drawing.SystemColors.Window;
this.btnClearSearch.Image = ((System.Drawing.Image)(resources.GetObject("btnClearSearch.Image")));
this.btnClearSearch.Location = new System.Drawing.Point(458, 6);
this.btnClearSearch.Name = "btnClearSearch";
this.btnClearSearch.Size = new System.Drawing.Size(16, 16);
this.btnClearSearch.TabIndex = 15;
this.btnClearSearch.TabStop = false;
this.btnClearSearch.Visible = false;
this.btnClearSearch.Click += new System.EventHandler(this.btnClearSearch_Click);
//
// lvFiles
//
this.lvFiles.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
resources.ApplyResources(this.lvFiles, "lvFiles");
this.lvFiles.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.chFile,
this.chFileExt,
@@ -279,11 +229,8 @@ namespace Duplicati.GUI.HelperControls {
this.chPath});
this.lvFiles.ContextMenuStrip = this.ctxSelection;
this.lvFiles.FullRowSelect = true;
this.lvFiles.Location = new System.Drawing.Point(15, 32);
this.lvFiles.Name = "lvFiles";
this.lvFiles.Size = new System.Drawing.Size(462, 205);
this.lvFiles.SmallImageList = this.imageList;
this.lvFiles.TabIndex = 16;
this.lvFiles.UseCompatibleStateImageBehavior = false;
this.lvFiles.View = System.Windows.Forms.View.Details;
this.lvFiles.VirtualMode = true;
@@ -293,55 +240,39 @@ namespace Duplicati.GUI.HelperControls {
//
// chFile
//
this.chFile.Text = "Filename";
this.chFile.Width = 116;
resources.ApplyResources(this.chFile, "chFile");
//
// chFileExt
//
this.chFileExt.Text = "Ext";
this.chFileExt.Width = 47;
resources.ApplyResources(this.chFileExt, "chFileExt");
//
// chSize
//
this.chSize.Text = "Size";
this.chSize.Width = 76;
resources.ApplyResources(this.chSize, "chSize");
//
// chPath
//
this.chPath.Text = "Path";
this.chPath.Width = 192;
resources.ApplyResources(this.chPath, "chPath");
//
// lbLoading
//
this.lbLoading.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
resources.ApplyResources(this.lbLoading, "lbLoading");
this.lbLoading.BackColor = System.Drawing.SystemColors.Control;
this.lbLoading.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbLoading.Location = new System.Drawing.Point(28, 98);
this.lbLoading.Name = "lbLoading";
this.lbLoading.Size = new System.Drawing.Size(427, 36);
this.lbLoading.TabIndex = 17;
this.lbLoading.Text = "Scanning files, please wait....";
this.lbLoading.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// btnOK
//
this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
resources.ApplyResources(this.btnOK, "btnOK");
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnOK.Location = new System.Drawing.Point(312, 418);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(75, 23);
this.btnOK.TabIndex = 18;
this.btnOK.Text = "OK";
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// TestSearchSelection
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnCancel;
this.ClientSize = new System.Drawing.Size(486, 453);
this.Controls.Add(this.btnOK);
this.Controls.Add(this.lbLoading);
this.Controls.Add(this.label3);
@@ -354,14 +285,10 @@ namespace Duplicati.GUI.HelperControls {
this.Controls.Add(this.lbTotalSize);
this.Controls.Add(this.label1);
this.Controls.Add(this.btnCancel);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MinimizeBox = false;
this.MinimumSize = new System.Drawing.Size(400, 400);
this.Name = "TestSearchSelection";
this.ShowInTaskbar = false;
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Test Search Selection";
this.Load += new System.EventHandler(this.dlgTestSearchSelection_Load);
this.ctxSelection.ResumeLayout(false);
this.ctxFilters.ResumeLayout(false);
@@ -379,7 +306,7 @@ namespace Duplicati.GUI.HelperControls {
private System.Windows.Forms.ToolStripMenuItem miInclude;
private System.Windows.Forms.ToolStripMenuItem miIncludeFileName;
private System.Windows.Forms.ToolStripMenuItem miIncludeFileExt;
private System.Windows.Forms.ToolStripMenuItem miExlude;
private System.Windows.Forms.ToolStripMenuItem miExclude;
private System.Windows.Forms.ToolStripMenuItem miExcludeFileName;
private System.Windows.Forms.ToolStripMenuItem miExcludeFileExt;
private System.Windows.Forms.Button btnCancel;
@@ -389,7 +316,7 @@ namespace Duplicati.GUI.HelperControls {
private System.ComponentModel.BackgroundWorker scanWorker;
private System.Windows.Forms.ContextMenuStrip ctxFilters;
private System.Windows.Forms.ToolStripMenuItem removeFilterToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem miExludeFilePath;
private System.Windows.Forms.ToolStripMenuItem miExcludeFilePath;
private System.Windows.Forms.Label lbTotalSize;
private System.Windows.Forms.ToolStripMenuItem miIncludeFilePath;
private System.Windows.Forms.Label label3;
@@ -78,7 +78,7 @@ namespace Duplicati.GUI.HelperControls {
long iA = (_ascending ? a : b).Size;
long iB = (_ascending ? b : a).Size;
return Convert.ToInt32(iA - iB);
return Math.Sign(iA - iB);
}
return 0;
@@ -219,11 +219,11 @@ namespace Duplicati.GUI.HelperControls {
try
{
CallbackHandler handler = new CallbackHandler(scanWorker);
CallbackHandler handler = new CallbackHandler(scanWorker, fn);
foreach (string scanDir in Paths)
{
if (!scanWorker.CancellationPending)
Library.Utility.Utility.EnumerateFileSystemEntries(scanDir, fn, handler.AddFileToList_Callback);
Library.Utility.Utility.EnumerateFileSystemEntries(scanDir, handler.AddFileToList_Callback);
}
return handler.Results;
@@ -239,26 +239,29 @@ namespace Duplicati.GUI.HelperControls {
{
public List<ResultItem> Results = new List<ResultItem>();
private BackgroundWorker Worker;
private FilenameFilter Filter;
public CallbackHandler(BackgroundWorker worker)
public CallbackHandler(BackgroundWorker worker, FilenameFilter filter)
{
Worker = worker;
Filter = filter;
}
public void AddFileToList_Callback(string rootpath, string path, Duplicati.Library.Utility.Utility.EnumeratedFileStatus status)
public bool AddFileToList_Callback(string rootpath, string path, FileAttributes attributes)
{
if (Worker.CancellationPending)
throw new AbortException();
if (status == Utility.EnumeratedFileStatus.File)
if (!Filter.ShouldInclude(rootpath, path))
return false;
if ((attributes & FileAttributes.Directory) == 0 && (attributes & Utility.ATTRIBUTE_ERROR) == 0)
{
Results.Add(new ResultItem(path));
}
else if (status == Utility.EnumeratedFileStatus.Folder)
{
//Should be displayed in tree so the user can exclude with right click?
}
return true;
}
}
@@ -371,7 +374,7 @@ namespace Duplicati.GUI.HelperControls {
miExcludeFileExt.Text = fileExt;
// Add Path items
miExludeFilePath.DropDownItems.Clear();
miExcludeFilePath.DropDownItems.Clear();
miIncludeFilePath.DropDownItems.Clear();
string fullpath = Utility.AppendDirSeparator(itm.Path);
@@ -395,14 +398,14 @@ namespace Duplicati.GUI.HelperControls {
string filter = string.Format(@"*\{0}", fullpath.Substring(s.Length));
miIncludeFilePath.DropDownItems.Add(filter, null, FilterFilePath_Click).Tag = true;
miExludeFilePath.DropDownItems.Add(filter, null, FilterFilePath_Click).Tag = false;
miExcludeFilePath.DropDownItems.Add(filter, null, FilterFilePath_Click).Tag = false;
}
foreach (string s in folderlist)
{
string filter = string.Format(@"{0}", s);
miIncludeFilePath.DropDownItems.Add(filter, null, FilterFilePath_Click).Tag = true;
miExludeFilePath.DropDownItems.Add(filter, null, FilterFilePath_Click).Tag = false;
miExcludeFilePath.DropDownItems.Add(filter, null, FilterFilePath_Click).Tag = false;
}
}
@@ -120,6 +120,64 @@
<metadata name="ctxSelection.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="miIncludeFileName.Size" type="System.Drawing.Size, System.Drawing">
<value>195, 22</value>
</data>
<data name="miIncludeFileName.Text" xml:space="preserve">
<value>Add filename filer</value>
</data>
<data name="miIncludeFileExt.Size" type="System.Drawing.Size, System.Drawing">
<value>195, 22</value>
</data>
<data name="miIncludeFileExt.Text" xml:space="preserve">
<value>Add file extension filter</value>
</data>
<data name="miIncludeFilePath.Size" type="System.Drawing.Size, System.Drawing">
<value>195, 22</value>
</data>
<data name="miIncludeFilePath.Text" xml:space="preserve">
<value>File path</value>
</data>
<data name="miInclude.Size" type="System.Drawing.Size, System.Drawing">
<value>109, 22</value>
</data>
<data name="miInclude.Text" xml:space="preserve">
<value>Include</value>
</data>
<data name="miExcludeFileName.Size" type="System.Drawing.Size, System.Drawing">
<value>195, 22</value>
</data>
<data name="miExcludeFileName.Text" xml:space="preserve">
<value>Add filename filter</value>
</data>
<data name="miExcludeFileExt.Size" type="System.Drawing.Size, System.Drawing">
<value>195, 22</value>
</data>
<data name="miExcludeFileExt.Text" xml:space="preserve">
<value>Add file extension filter</value>
</data>
<data name="miExcludeFilePath.Size" type="System.Drawing.Size, System.Drawing">
<value>195, 22</value>
</data>
<data name="miExcludeFilePath.Text" xml:space="preserve">
<value>File Path</value>
</data>
<data name="miExclude.Size" type="System.Drawing.Size, System.Drawing">
<value>109, 22</value>
</data>
<data name="miExclude.Text" xml:space="preserve">
<value>Exclude</value>
</data>
<data name="ctxSelection.Size" type="System.Drawing.Size, System.Drawing">
<value>110, 48</value>
</data>
<data name="&gt;&gt;ctxSelection.Name" xml:space="preserve">
<value>ctxSelection</value>
</data>
<data name="&gt;&gt;ctxSelection.Type" xml:space="preserve">
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<metadata name="imageList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>120, 17</value>
</metadata>
@@ -127,143 +185,353 @@
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACy
HQAAAk1TRnQBSQFMAgEBCgEAAbQBAAG0AQABEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA
AwABMAMAAQEBAAEgBgABMP8A/wD/ABkAASgBpAEoAf8BKAGkASgB/wwAAS0BmgEuAfYBKAGkASgB/wEq
AaIBKwH9ASgBpAEoAf8BIgEmASIBMQgAAwgBCwEoAaQBKAH/ASgBpAEoAf8EAAIoAaQB/wIoAaQB/wwA
Ai0BnQH2AigBpAH/AioBowH9AigBpAH/AiIBJgExCAACCAEJAQsCKAGkAf8CKAGkAf+EAAFCAcgBZQH/
AU0B2AF+Af8IAAEmASsBJgE4AUYB0QFpAf8BPgHFAVcB/wEvAZYBMwHuAU0B3AF4Af8BKgGnAS0B/wgA
ASoBogErAf0BWwHrAZ8B/wEoAaQBKAH/BAACSgHIAf8CWwHaAf8IAAImASsBOAJQAdMB/wJFAcYB/wEv
ATEBmAHuAlkB3QH/AisBpwH/CAACKgGjAf0CbQHsAf8CKQGiAf6EAAFBAccBYgH/AUwB1gF5Af8IAAEo
AaQBKAH/AUoB2QFxAf8BMAGYATMB8QQAAS0BrAE0Af8BSwHaAXMB/wE6AYcBPQHOAUABYQFEAYwBUgHg
AYgB/wE8AcABVgH/AQwBDQEMARAEAAJKAcgB/wJaAdgB/wgAAigBpAH/AVUBVAHaAf8BMAExAZoB8QQA
Ai8BrQH/AlcB3AH/AToBPQGIAc4BQAFCAWEBjAJiAeMB/wJEAcIB/wIMAQ0BEIQAAUEBxgFhAf8BSwHV
AXcB/wEpATEBKQI/AXQBRQGvAUYB0gFoAf8BOgHAAU0B/wEOAQ8BDgETBAABNQFCATcBWgFBAcwBXgH/
AT0BxQFWAf8BNQG3AUUB/wFSAeABhwH/AUEBbQFFAaEIAAJKAcgB/wJYAdcB/wIpATECPwFCAXYBrwJP
AdQB/wI/AcIB/wIOAQ8BEwQAATUBNgFDAVoCSgHOAf8CRQHHAf8COgG4Af8CYgHjAf8BQQFEAW8BoYgA
AUABxgFgAf8BVQHlAY8B/wFRAeABhAH/AU0B3AF4Af8BQwHOAWAB/wE0AZMBNwHmDAABMgGWATUB6wFL
AdkBcgH/AU8B3gF9Af8BKAGkASgB/wwAAkoBxwH/AmcB5wH/AmAB4gH/AlkB3gH/AUwBSwHQAf8BNAE2
AZQB5gwAATIBNQGXAesCVwHbAf8CXQHgAf8CKAGkAf+MAAFAAcYBYAH/AUoB1QF1Af8BKAGkASgB/wEo
AaUBKQH/AUcB1QFpAf8BOAG/AUoB/wMJAQwIAAE/AVwBRAGFAUcB1AFqAf8BTwHeAXwB/wEtAZ4BLwH3
DAACSgHHAf8CVwHWAf8CKAGkAf8CKQGlAf8BUgFRAdcB/wI+AcEB/wMJAQwIAAE/AUEBXgGFAlIB1gH/
Al0B4AH/AS0BLgGfAfeMAAFBAcYBYAH/AUoB1QF2Af8IAAExAbMBPAH/AUYB1QFmAf8BNgFGATgBXwQA
AwQBBgExAbMBPAH/AUoB2AFwAf8BOwHBAVMB/wFOAdsBfQH/AT0BVgFBAXkIAAJKAcgB/wJYAdcB/wgA
AjUBtAH/AlAB1wH/ATYBNwFHAV8EAAMEAQYCNQG0Af8CVwHbAf8CQwHDAf8CXQHeAf8BPQFAAVcBeYgA
AUEBxwFiAf8BSwHWAXgB/wFBAXEBQQGfAToBhgFAAdABQwHOAWMB/wFGAdMBZwH/ASYBKwEmATgEAAEp
AZ0BKwH7AUoB2QFxAf8BKAGkASgB/wE/AXgBRAG0AVQB4wGMAf8BNQG2AUUB/wMDAQQEAAJKAcgB/wJa
AdgB/wJBAXEBnwE6AT4BiQHQAk4B0AH/AlEB1QH/AiYBKwE4BAABKQEqAZ4B+wJXAdwB/wIoAaQB/wE/
AUIBegG0AmYB5gH/AjoBtwH/AwMBBIQAAUIByAFkAf8BWQHpAZkB/wFVAeUBjwH/AVIB4QGGAf8BTgHc
AXsB/wEpAaABKgH+BAABPwFdAUMBhAFIAdYBbgH/ATgBvAFLAf8BDgEPAQ4BEwQAASgBpQEpAf8BWwHq
AZ0B/wEqAZ0BKwH5BAACSgHIAf8CbAHrAf8CaAHoAf8CYwHkAf8CXQHgAf8CKQGiAf4EAAE/AUEBXgGE
AlUB2QH/Aj8BvgH/Ag4BDwETBAACKQGlAf8CbQHsAf8BKgErAZ4B+YQAAT4BgQE+AbsBPgGEAT4BvwE+
AYQBPgG/AT4BfAFDAbsBOAFKAToBZQgAATEBPQEzAVEBPgGCAT4BvwE9AVYBQAF4CAABEQESAREBFwE+
AYIBPgG/AUEBdgFCAawEAAI+AYEBuwI+AYQBvwI+AYQBvwE+AUABfwG7ATgBOQFKAWUIAAExATIBPQFR
Aj4BggG/AT0BPwFXAXgIAAIRARIBFwI+AYIBvwJBAXgBrP8A/wD/AIoAAQEDIQEwAyMBMwMjATMDIQEw
DAADHwEsAyMBMwMjATMDIwEzAyMBMwMjATMDIQEwDAADIwEzAyMBMxAAAx8BLAMjATMDIwEzAyEBMFsA
BAEBAgMDAQQDBQQHAQkDBgEIAwQBBgMDAQQDAQECAwABARAAAwIBAwGGAW8BUwHxAbcBgwE7Af8BtwGD
ATwB/wGJAW8BTgHyDAABWwFjAVsB4QFBAYUBQwH/AUIBhAFCAf8BQgGEAUIB/wFDAYQBQwH/AUMBhQFF
Af8BVwFyAVkB8ggAAyMBMwG3AYMBPAH/AbcBgwE8Af8DIwEzDAABWwFjAVsB4QFBAYUBRAH/AUIBhQFE
Af8BVwFyAVkB8lwAAwQBBQMJAQwDDQERAzEBTgMaASQDDwEUAw0BEQMJAQwDBAEFFAABtwGCATsB/wH7
Ac4BiAH/AfkBygGAAf8BuQGDATsB/wwAAUABhAFDAf8BngHoAckB/wFIAcgBkgH/AUoByAGTAf8BSwHI
AZQB/wFNAcwBmQH/AUIBhQFEAf8EAAMjATMBtQGBATkB/wH0AcQBcgH/AfQBxAFyAf8BtQGBATkB/wMj
ATMIAAE/AYQBQwH/AZ4B6QHKAf8BSwHMAZgB/wFCAYUBRAH/ZAADNwFbA5IB9ANaAcUDAQECIAABtgGB
ATkB/wH0AcsBigH/AfEBwAFtAf8BuAGCAToB/wwAAT8BhAFCAf8BuwHqAd0B/wG4AeYB2AH/AbkB5gHY
Af8BugHnAdkB/wG9AesB3gH/AUABhQFDAf8DIwEzAbUBgQE5Af8B8gHBAW4B/wHuAbwBagH/Ae4BvQFr
Af8B8gHBAW4B/wG4AYEBOQH/AyMBMwQAAT0BhAFCAf8BvAHrAd4B/wG9AesB3wH/AUABhQFDAf9gAAMW
AR4BagFrAWoB4gG8AcMBwAH/AakBrwGtAfsDTAGQIAABtgGBATkB/wHxAcoBkAH/AesBuAFlAf8BuAGC
AToB/wwAA1QBrgE/AYQBQgH/AT0BggE/Af8BPQGCAT8B/wE9AYIBPwH/AT8BhAFCAf8BVwFaAVcBxQG4
AYQBPAH/AfcBzgGPAf8B8gHJAYkB/wHtAcIBggH/AesBuQFnAf8B8gHJAYoB/wH5Ac4BjwH/AcIBhAE7
Af8EAAFUAVYBVAGrAT8BhAFCAf8BPwGEAUIB/wFWAVgBVgHBXAADAwEEA10BygHDAckBxgH/AbYBvQG6
Af8BugHBAb4B/wGLAY4BiwHxAy4BSBwAAbYBgQE4Af8B7wHNAZgB/wHmAbIBXgH/AbgBggE7Af8MAAMZ
BCMBMwMjATMDIwEzAxgBIggAAVwBWgFXAcUBtwGCAToB/wGzAXUBNQH/AfAByAGOAf8B6QG4AWQB/wGz
AXYBNwH/AbgBggE6Af8CWwFZAcQEAAMZBCMBMwMjATMDIwEzAxkBIxMAAQEDAgEDAwUBBwMIBAsBDwMN
ARIDDQESAwoBDgMIAQsDBQEHAwIBAxwAA1ABmwG0AbcBtgH8AbYBvQG6Af8BuwHCAb8B/wHHAc0BywH/
AdUB2QHXAf8DcAHkAw8BFBgAAbYBgQE4Af8B7gHPAaEB/wHgAawBVgH/AbkBgwE8Af8MAAFWAVkBVgG+
AUEBhQFDAf8BQgGEAUIB/wFDAYUBRQH/AVcBWgFXAb0QAAG2AYABOAH/AfABywGWAf8B5wG0AWEB/wG2
AYIBOgH/DAABVwFaAVcBvQFAAYUBQwH/AUIBhAFCAf8BQwGFAUUB/wFXAVkBVwG/HwABAQMEAQUDBgEI
AwYBCAMFAQcDAgEDIAADNQFXAYsBjgGLAfEBuQHAAb0B/wG9AcMBwAH/AcMByAHGAf8BxwHNAcsB/wHN
AdIB0AH/AdsB3gHdAf8DWwHHAwABARQAAbYBgQE3Af8B7wHTAaoB/wHaAaUBTwH/AbkBgwE8Af8MAAE/
AYQBQwH/AZ4B6AHJAf8BSQHJAZMB/wFNAcwBmAH/AUIBhQFEAf8QAAG2AYEBOAH/Ae8BzgGdAf8B5AGx
AVwB/wG4AYIBOwH/DAABPgGFAUMB/wGeAegByQH/AUkByQGTAf8BTQHMAZgB/wFCAYUBRAH/DAADSAGD
A2MB1QNjAdUDYwHUA18B0wNfAdMDXwHSA2AB0QNgAdEDYAHRA2AB0QNfAdIDXwHRAxIBGQwAAxQBGwFr
AmwB4AG+AcQBwQH/AbcBvgG7Af8BuwHCAb8B/wHAAcYBxAH/AcUBywHJAf8BywHQAc0B/wHQAdQB0gH/
Ab8BwgHBAfwDSgGNFAABtgGBATcB/wHwAdkBtAH/AdYBnwFIAf8BuAGEATwB/wwAAT0BhAFCAf8BuwHq
Ad0B/wG5AecB2QH/Ab0B6wHeAf8BQAGFAUMB/xAAAbYBgQE3Af8B8AHRAaQB/wHgAawBVgH/AbgBgwE7
Af8MAAE/AYQBQgH/AbsB6gHdAf8BuQHnAdkB/wG9AesB3gH/AUABhQFDAf8MAAMdASkDhAHuAdsB3gHd
Af8B0gHXAdUB/wHOAdMB0QH/AckBzgHMAf8BxQHKAcgB/wHAAcYBwwH/Ab0BwwHBAf8BvQHDAcEB/wG9
AcMBwQH/AcwB0QHPAf8DVwG3DAADAgEDA1wByQHFAcoByAH/AbcBvgG7Af8BtwG+AbsB/wG5AcABvQH/
Ab4BxQHCAf8BwwHJAcYB/wHJAc4BzAH/Ac0B0gHQAf8B1QHZAdcB/wOVAfMDLAFDCAADIQEwAyMBMwG3
AYEBNwH/Ae8B2wG9Af8B0AGaAUEB/wG4AYQBPQH/AyMBMwMhATAEAAFTAVUBUwGtAT4BhAFCAf8BPQGC
AUAB/wE/AYQBQgH/AVQBbAFUAe4QAAG2AYEBNwH/Ae8B1AGtAf8B3QGoAVIB/wG5AYMBPAH/DAADVAGu
AT8BhAFCAf8BPQGCAUAB/wE/AYQBQgH/AVkBawFZAesQAAM/AWwBsAKzAfoB0gHWAdQB/wHMAdEBzwH/
AccBzAHKAf8BwgHIAcUB/wG9AcMBwAH/AbcBvgG7Af8BtwG+AbsB/wHBAccBxQH/A2YB2gMKAQ4MAANM
AZMBtQG5AbcB/AHFAcsByAH/AcUBywHIAf8BxQHLAcgB/wHFAcsByAH/AcgBzgHLAf8BzAHRAc4B/wHP
AdQB0gH/AdMB1wHVAf8B1gHaAdgB/wHfAeIB4QH/A2oB4gMDAQQEAAGIAW8BTgHyAbkBhAE7Af8BtwGB
ATgB/wHaAbcBhwH/AcYBjwE9Af8BuAGDATwB/wG6AYQBOwH/AYsBbwFTAfEEAAMYASIDIwEzAyMBMwMY
ASIUAAG2AYEBNwH/AfAB2AG1Af8B2QGjAUwB/wG5AYMBPAH/DAADGQQjATMDIwEzAyMBMwMjATMDIwEz
AxkBIwwAA1QBrgHMAdABzgH+Ac4B0wHRAf8ByQHOAcwB/wHEAcoBxwH/Ab8BxQHCAf8BugHAAb4B/wG6
AcEBvgH/A38B7QMoATwQAAMgAS4DPwFsAz8BbAM/AWwDPgFrAz4BagM+AWoDPgFqAz0BaQM9AWkDPQFo
Az0BaAM7AWQDBAEGBAABuQGEATwB/wHoAdEBrAH/AcYBjwE2Af8BxgGPATgB/wHGAZABOQH/AcYBjwE2
Af8B7AHVAbIB/wHDAYQBOgH/BAABVgFYAVYBvAFBAYUBRAH/AUIBhQFEAf8BVwFaAVcBvRQAAbYBgAE2
Af8B8QHcAbwB/wHVAZ8BRwH/AbkBhAE8Af8MAAFWAVkBVgG+AUEBhQFDAf8BQgGEAUIB/wFCAYQBQgH/
AUMBhAFDAf8BQwGFAUUB/wFYAVoBWAHADAADBQEHA2MC2QHcAdsB/wHLAdABzgH/AcYBywHJAf8BvQHE
AcEB/wG4Ab8BvAH/AaYBqQGoAfoDSAGDVAABuAGCATgB/wHoAdABrQH/AcIBiwEwAf8BwgGLATAB/wHo
AdABrQH/AbkBggE4Af8IAAE+AYUBQwH/AZ4B6QHKAf8BSwHMAZgB/wFCAYUBRAH/FAABtwGBATYB/wHw
AdsBuwH/AdABmQFAAf8BugGDATsB/wwAAUABhAFDAf8BngHoAckB/wFIAcgBkgH/AUoByAGTAf8BSwHI
AZQB/wFNAcwBmQH/AUIBhQFEAf8QAAMcAScBfwGAAX8B6wHLAdABzgH/AbkBwAG9Af8BtgG9AboB/wHF
AcoByAH/A1kBv1wAAbcBgQE4Af8B6AHRAbAB/wHoAdEBsAH/AbgBgQE4Af8MAAE+AYQBQgH/AbwB6wHe
Af8BvQHrAd8B/wFAAYUBQwH/FAABuAGCATgB/wHvAdsBuwH/AeoB0AGpAf8BugGDAToB/wwAAT8BhAFC
Af8BuwHqAd0B/wG4AeYB2AH/AbkB5gHYAf8BugHnAdkB/wG9AesB3gH/AUABhQFDAf8UAAM9AWgBkgGX
AZQB9QG3Ab4BuwH/Ab4BxQHCAf8DZgHeAw0BEmAAAbgBgwE6Af8BuAGDAToB/xAAAVMBVQFTAbABPwGE
AUIB/wE/AYQBQgH/AVYBawFYAe8UAAJVAVMBsAG4AYIBOQH/AbgBgwE5Af8CVQFTAbAMAAFTAVUBUwGw
AT8BhAFCAf8BPQGCAT8B/wE9AYIBPwH/AT0BggE/Af8BPwGEAUIB/wFWAWsBWAHvGAADUgGpAbkBvgG8
Af4BggGDAYIB7wMtAUbwAAMFAQcDWwHEA0YBfv8AdQADEwEaASwCKwFDASwCKwFDASwCKwFD8AADVQGy
AUMB4gGMAf8BQgHhAYkB/wE0AcgBXAH/8AADVQGyATcB1AFXAf8BLgHLAT4B/wE0AckBXAH/sAADDAEQ
Az0BaAMqAUA0AANVAbIBPwHaAWEB/wEvAcwBQAH/ATQBygFcAf9cAAMQARYDFwEgAxcBIAMXASADFwEg
AxcBIAMXASADFwEgAxcBIAMXASADFwEgAxcBIAMXASADCQEMGAADCgEOAygBPANeAdUDTAGQAxMBGgMD
AQQsAANVAbIBSwHjAYEB/wE7AdQBTQH/ATUBywFdAf9cAANIAYMDWQG/A1kBvwNZAb8DWQG/A1kBvwNZ
Ab8DWQG/A1kBvwNZAb8DWQG/A1kBvwNZAb8DLgFIGAADNAFUA1kBxwNfAfMDXAHfA1ABmwMSARgcAAE+
AX8BPAH+AT4B0wFjAf8BPgHUAWUB/wE/AdQBZQH/AT4B0wFkAf8BVwHqAYQB/wFKAd8BXQH/AUgB4wGQ
Af8BNQHKAVsB/wEzAcgBWgH/ATIBxgFYAf8BMgHFAVgB/wMwAUwMAANIAYQCOgHTAf8CPAHUAf8CPgHU
Af8CPwHTAf8CPgHQAf8COwHMAf8CNwHHAf8CMwHDAf8CMQHCAf8CMQHCAf8CIAGoAf8MAAM/AW0DWwHD
A14B/wNeAf8DXgH/A14B/wNeAf8DXgH/A14B/wNeAf8DXgH/A2QB5wNTAaUDKAE8EAADBAEGAy4BSANU
AaYDXgH/A14B/wNeAf8DYQHhA0IBdAMdASoYAAFBAYEBQQH+AVMB2gFmAf8BXAHkAYEB/wFiAewBhgH/
AWUB8AGKAf8BYgHvAYcB/wFZAeoBgQH/AUwB4QFgAf8BPwHXAVEB/wEzAc4BRAH/AS4BywE+Af8BQQHg
AYcB/wMwAUwMAANIAYQCTAHXAf8CUwHWAf8CXwHkAf8CZwHuAf8CZwHwAf8CWwHpAf8CSAHcAf8COAHQ
Af8CMwHMAf8CMwHMAf8CKgG3Af8QAAM6AWADXgH/A14B/wNeAf8DXgH/A14B/wNeAf8DXgH/A14B/wNe
Af8DWQG/AwwBEBQAAwwBEANZAb8DXgH/A14B/wNeAf8DXgH/A14B/wNeAf8DQAFwGAABQQGCAUEB/gFM
AdYBgQH/AVQB3wGFAf8BWwHnAY0B/wFgAe4BkwH/AWUB7wGKAf8BYwHwAYgB/wFbAewBhgH/AVAB5wGC
Af8BRQHeAWcB/wE7AdcBXAH/AUIB4QGKAf8DMAFMDAADSAGEAk0B2gH/AlQB3QH/Al4B6AH/AmQB8AH/
AmQB8gH/AlsB7AH/AkwB4gH/Aj4B2AH/AjkB1AH/AjkB1AH/AioBtwH/EAADGgEkAz4BagNdAdcDXgH/
A14B/wNeAf8DXgH/A14B/wNeAf8DVAGmAy4BSAMEAQYQAAMoATwDUwGlA2QB5wNeAf8DXgH/A14B/wNe
Af8DXgH/A14B/wNcAckDQwF3AwcBChAAAVYCVQGxA1UBtQNVAbUDVQG1A1cB6AFgAe0BkwH/AWUB7wGJ
Af8BQQHWAYEB/wNVAbUDVQG1A1UBtQNVAbUDGAEhDAADLQFGA1UBtQNVAbUDVQG1A1UBtQNVAbUDVQG1
A1UBtQNVAbUDVQG1A1UBtQFWAlUBtBQAAwkBDANMAY8DXwHbA14B/wNeAf8DXgH/A18B8wNZAccDNAFU
FAADHwEsA0kBiANeAf8DXgH/A14B/wNeAf8DXgH/A14B/wNeAf8DXgH/A14B/wNcAc8DMAFMAxIBGBwA
A1UBsgFZAeUBiwH/AWAB6AGDAf8BQQHWAYEB/2QAAwEBAgMSARgDRwGCA14B/wNeAf8DXgH/A14B1QMo
ATwDCgEOFAADTgGZA2AB6wNeAf8DXgH/A14B/wNeAf8DXgH/A14B/wNeAf8DXgH/A14B/wNmAfcDYQHh
AzQBVBwAA1UBsgFQAdsBgQH/AVcB3gGAAf8BQAHVAWkB/2wAAyYBOANMAZADZAHnA1oBwAM9AWgDDAEQ
GAADNgFYA0cBgANHAYADRwGAA0cBgANHAYADRwGAA0cBgANHAYADRwGAA0cBgANHAYADRwGAAyEBMBwA
A1UBsgFHAdIBaAH/AUwB0wFfAf8BPwHUAWcB/3AAAxQBHANVAbUDQAFwdAADVAGrASIBuQEnAf8BIgG4
AScB/wEgAbUBIwH/cAADBgEIAyMBNAMXASD/AP8AXgABQgFNAT4HAAE+AwABKAMAAUADAAEwAwABAQEA
AQEFAAGAAQEWAAP/AQAE/wQABP8EAAT/BAABnAEYAZwBGAQAAZgBGAGYARgEAAGYAYABmAGABAABgAGB
AYABgQQAAYEBwwGBAcMEAAGAAcMBgAHDBAABmAGBAZgBgQQABIAEAAGBAQgBgQEIBAABgwEYAYMBGAQA
BP8EAAT/BAAE/wQAAYMBgAHnAYcC/wHgAQcBgwGAAcMBhwL/AfABBwHDAYABgQGHAv8B/AE/AcMBgAEA
AYcC/wH4AT8BwwGAAQABhwL/AfABHwHDAYMBAAGDAcABBwHwAQ8BwwGDAcMBgwH4AR8B4AEHAcMBgwHD
AYMBgAEBAcABBwHDAYMBwwGDAYABAwGAAQMBAAGDAcMBgwHAAQMBgAEBAQABhwHDAYAB4AEHAYABAQEA
AYcBwwGAAeABDwL/AYEBhwHDAYAB8AEfAv8BwwGHAcMBgAH4AR8C/wHnAYcBwwGAAfwBPwb/AfwBfwr/
AfwBPwb/AfwBPwb/AfwBPwT/AfwBfwH8AT8C/wGAAQEB+AEfAfwBPwL/AYABAQH4AR8BwAEBAcABAwGA
AQEB4AEPAcABAQHAAQMBwAEDAeABDwHAAQEBwAEDAcABAwHAAQMBwAEBAcABAwHgAQ8BgAEBAfwBPwL/
AeABDwGAAQEB/AE/Av8B+AEfAYABAQH8AT8C/wH8AX8C/wH8AT8C/wH8AX8S/ws=
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAB4
HQAAAk1TRnQBSQFMAgEBCgEAAbwBAAG8AQABEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA
AwABMAMAAQEBAAEgBgABMP8A/wD/ABkAAScBpAEnAf8BJwGkAScB/wwAAS8BlgEwAfYBJwGkAScB/wEr
AaIBLAH9AScBpAEnAf8DIgExCAADCAELAScBpAEnAf8BJwGkAScB/wQAAicBpAH/AicBpAH/DAACLwGX
AfYCJwGkAf8CKwGjAf0CJwGkAf8DIgExCAADCAELAicBpAH/AicBpAH/hAABQQHIAWQB/wFMAdgBfQH/
CAADJgE4AUUB0QFoAf8BPQHFAVYB/wE1AY8BOQHuAUwB3AF3Af8BKQGnASwB/wgAASsBogEsAf0BWgHr
AZ8B/wEnAaQBJwH/BAACSQHIAf8CWgHaAf8IAAMmATgCTwHTAf8CRAHGAf8BNQE3AZEB7gJYAd0B/wIq
AacB/wgAAisBowH9AmwB7AH/AikBoAH+hAABQAHHAWEB/wFLAdYBeAH/CAABJwGkAScB/wFJAdkBcAH/
ATQBkwE3AfEEAAEsAawBMwH/AUoB2gFyAf8BRgF4AUcBzgFHAVEBSAGMAVEB4AGIAf8BOwHAAVUB/wMM
ARAEAAJJAcgB/wJZAdgB/wgAAicBpAH/AVQBUwHaAf8BNAE1AZUB8QQAAi4BrQH/AlYB3AH/AUYBRwF6
Ac4BRwFIAVEBjAJhAeMB/wJDAcIB/wMMARCEAAFAAcYBYAH/AUoB1QF2Af8BKQEqASkBPwFKAWQBTQGv
AUUB0gFnAf8BOQHAAUwB/wMOARMEAAE3ATgBNwFaAUABzAFdAf8BPAHFAVUB/wE0AbcBRAH/AVEB4AGH
Af8BSgFdAUwBoQgAAkkByAH/AlcB1wH/AikBKgE/AUoBSwFlAa8CTgHUAf8CPgHCAf8DDgETBAACNwE4
AVoCSQHOAf8CRAHHAf8COQG4Af8CYQHjAf8BSgFMAV0BoYgAAT8BxgFfAf8BVAHlAY8B/wFQAeABhAH/
AUwB3AF3Af8BQgHOAV8B/wE9AYsBPwHmDAABOAGOATwB6wFKAdkBcQH/AU4B3gF8Af8BJwGkAScB/wwA
AkkBxwH/AmYB5wH/Al8B4gH/AlgB3gH/AUsBSgHQAf8BPQE+AYsB5gwAATgBPAGPAesCVgHbAf8CXAHg
Af8CJwGkAf+MAAE/AcYBXwH/AUkB1QF0Af8BJwGkAScB/wEnAaUBKAH/AUYB1QFoAf8BNwG/AUkB/wMJ
AQwIAAFGAU0BRwGFAUYB1AFpAf8BTgHeAXsB/wExAZoBMwH3DAACSQHHAf8CVgHWAf8CJwGkAf8CKAGl
Af8BUQFQAdcB/wI9AcEB/wMJAQwIAAJGAU4BhQJRAdYB/wJcAeAB/wExATIBmwH3jAABQAHGAV8B/wFJ
AdUBdQH/CAABMAGzATsB/wFFAdUBZQH/ATgBOwE5AV8EAAMEAQYBMAGzATsB/wFJAdgBbwH/AToBwQFS
Af8BTQHbAXwB/wFCAUgBQwF5CAACSQHIAf8CVwHXAf8IAAI0AbQB/wJPAdcB/wI4ATsBXwQAAwQBBgI0
AbQB/wJWAdsB/wJCAcMB/wJcAd4B/wFCAUMBSAF5iAABQAHHAWEB/wFKAdYBdwH/AUoBXQFKAZ8BRQF4
AUkB0AFCAc4BYgH/AUUB0wFmAf8DJgE4BAABKQGbASsB+wFJAdkBcAH/AScBpAEnAf8BSgFoAUwBtAFT
AeMBjAH/ATQBtgFEAf8DAwEEBAACSQHIAf8CWQHYAf8CSgFdAZ8BRQFJAXsB0AJNAdAB/wJQAdUB/wMm
ATgEAAEpASoBnAH7AlYB3AH/AicBpAH/AUoBTAFoAbQCZQHmAf8COQG3Af8DAwEEhAABQQHIAWMB/wFY
AekBmQH/AVQB5QGPAf8BUQHhAYYB/wFNAdwBegH/ASkBngEqAf4EAAFGAU0BRwGEAUcB1gFtAf8BNwG8
AUoB/wMOARMEAAEnAaUBKAH/AVoB6gGdAf8BKwGZAS0B+QQAAkkByAH/AmsB6wH/AmcB6AH/AmIB5AH/
AlwB4AH/AikBoAH+BAACRgFOAYQCVAHZAf8CPgG+Af8DDgETBAACKAGlAf8CbAHsAf8BKwEtAZoB+YQA
AUkBbwFJAbsBSQFyAUkBvwFJAXIBSQG/AUkBbAFLAbsBOwE9ATsBZQgAATIBMwEyAVEBSQFwAUkBvwFC
AUcBQwF4CAADEQEXAUkBcAFJAb8BSwFkAUwBrAQAAkkBbwG7AkkBcgG/AkkBcgG/AUkBSwFsAbsCOwE9
AWUIAAIyATMBUQJJAXABvwFCAUMBSAF4CAADEQEXAkkBcAG/AksBZQGs/wD/AP8AigABAQMhATADIwEz
AyMBMwMhATAMAAMfASwDIwEzAyMBMwMjATMDIwEzAyMBMwMhATAMAAMjATMDIwEzEAADHwEsAyMBMwMj
ATMDIQEwWwAEAQECAwMBBAMFBAcBCQMGAQgDBAEGAwMBBAMBAQIDAAEBEAADAgEDAYMBbgFTAfEBtwGD
AToB/wG3AYMBOwH/AYUBbAFPAfIMAAFbAWEBWwHhAUABhQFCAf8BQQGEAUEB/wFBAYQBQQH/AUIBhAFC
Af8BQgGFAUQB/wFYAW8BWQHyCAADIwEzAbcBgwE7Af8BtwGDATsB/wMjATMMAAFbAWEBWwHhAUABhQFD
Af8BQQGFAUMB/wFYAW8BWQHyXAADBAEFAwkBDAMNAREDMQFOAxoBJAMPARQDDQERAwkBDAMEAQUUAAG3
AYIBOgH/AfsBzgGIAf8B+QHKAYAB/wG5AYMBOgH/DAABPwGEAUIB/wGeAegByQH/AUcByAGSAf8BSQHI
AZMB/wFKAcgBlAH/AUwBzAGZAf8BQQGFAUMB/wQAAyMBMwG1AYEBOAH/AfQBxAFxAf8B9AHEAXEB/wG1
AYEBOAH/AyMBMwgAAT4BhAFCAf8BngHpAcoB/wFKAcwBmAH/AUEBhQFDAf9kAAM3AVsDjgH0A1oBxQMB
AQIgAAG2AYEBOAH/AfQBywGKAf8B8QHAAWwB/wG4AYIBOQH/DAABPgGEAUEB/wG7AeoB3QH/AbgB5gHY
Af8BuQHmAdgB/wG6AecB2QH/Ab0B6wHeAf8BPwGFAUIB/wMjATMBtQGBATgB/wHyAcEBbQH/Ae4BvAFp
Af8B7gG9AWoB/wHyAcEBbQH/AbgBgQE4Af8DIwEzBAABPAGEAUEB/wG8AesB3gH/Ab0B6wHfAf8BPwGF
AUIB/2AAAxYBHgFoAWkBaAHiAbwBwwHAAf8BpQGrAakB+wNMAZAgAAG2AYEBOAH/AfEBygGQAf8B6wG4
AWQB/wG4AYIBOQH/DAADVAGuAT4BhAFBAf8BPAGCAT4B/wE8AYIBPgH/ATwBggE+Af8BPgGEAUEB/wFX
AVoBVwHFAbgBhAE7Af8B9wHOAY8B/wHyAckBiQH/Ae0BwgGCAf8B6wG5AWYB/wHyAckBigH/AfkBzgGP
Af8BwgGEAToB/wQAAVQBVgFUAasBPgGEAUEB/wE+AYQBQQH/AVYBWAFWAcFcAAMDAQQDXQHKAcMByQHG
Af8BtgG9AboB/wG6AcEBvgH/AYYBiQGGAfEDLgFIHAABtgGBATcB/wHvAc0BmAH/AeYBsgFdAf8BuAGC
AToB/wwAAxkEIwEzAyMBMwMjATMDGAEiCAACWgFXAcUBtwGCATkB/wGzAXQBNAH/AfAByAGOAf8B6QG4
AWMB/wGzAXUBNgH/AbgBggE5Af8CWwFZAcQEAAMZBCMBMwMjATMDIwEzAxkBIxMAAQEDAgEDAwUBBwMI
BAsBDwMNARIDDQESAwoBDgMIAQsDBQEHAwIBAxwAA1ABmwGyAbUBtAH8AbYBvQG6Af8BuwHCAb8B/wHH
Ac0BywH/AdUB2QHXAf8DawHkAw8BFBgAAbYBgQE3Af8B7gHPAaEB/wHgAawBVQH/AbkBgwE7Af8MAAFW
AVkBVgG+AUABhQFCAf8BQQGEAUEB/wFCAYUBRAH/AVcBWgFXAb0QAAG2AYABNwH/AfABywGWAf8B5wG0
AWAB/wG2AYIBOQH/DAABVwFaAVcBvQE/AYUBQgH/AUEBhAFBAf8BQgGFAUQB/wFXAVkBVwG/HwABAQME
AQUDBgEIAwYBCAMFAQcDAgEDIAADNQFXAYYBiQGGAfEBuQHAAb0B/wG9AcMBwAH/AcMByAHGAf8BxwHN
AcsB/wHNAdIB0AH/AdsB3gHdAf8DWgHHAwABARQAAbYBgQE2Af8B7wHTAaoB/wHaAaUBTgH/AbkBgwE7
Af8MAAE+AYQBQgH/AZ4B6AHJAf8BSAHJAZMB/wFMAcwBmAH/AUEBhQFDAf8QAAG2AYEBNwH/Ae8BzgGd
Af8B5AGxAVsB/wG4AYIBOgH/DAABPQGFAUIB/wGeAegByQH/AUgByQGTAf8BTAHMAZgB/wFBAYUBQwH/
DAADSAGDA2IB1QNiAdUDYAHUA14B0wNeAdMDXQHSA18B0QNfAdEDXwHRA18B0QNdAdIDXgHRAxIBGQwA
AxQBGwNpAeABvgHEAcEB/wG3Ab4BuwH/AbsBwgG/Af8BwAHGAcQB/wHFAcsByQH/AcsB0AHNAf8B0AHU
AdIB/wG9Ab8BvgH8A0oBjRQAAbYBgQE2Af8B8AHZAbQB/wHWAZ8BRwH/AbgBhAE7Af8MAAE8AYQBQQH/
AbsB6gHdAf8BuQHnAdkB/wG9AesB3gH/AT8BhQFCAf8QAAG2AYEBNgH/AfAB0QGkAf8B4AGsAVUB/wG4
AYMBOgH/DAABPgGEAUEB/wG7AeoB3QH/AbkB5wHZAf8BvQHrAd4B/wE/AYUBQgH/DAADHQEpA38B7gHb
Ad4B3QH/AdIB1wHVAf8BzgHTAdEB/wHJAc4BzAH/AcUBygHIAf8BwAHGAcMB/wG9AcMBwQH/Ab0BwwHB
Af8BvQHDAcEB/wHMAdEBzwH/A1cBtwwAAwIBAwNcAckBxQHKAcgB/wG3Ab4BuwH/AbcBvgG7Af8BuQHA
Ab0B/wG+AcUBwgH/AcMByQHGAf8ByQHOAcwB/wHNAdIB0AH/AdUB2QHXAf8DkQHzAywBQwgAAyEBMAMj
ATMBtwGBATYB/wHvAdsBvQH/AdABmgFAAf8BuAGEATwB/wMjATMDIQEwBAABUwFVAVMBrQE9AYQBQQH/
ATwBggE/Af8BPgGEAUEB/wFUAWoBVAHuEAABtgGBATYB/wHvAdQBrQH/Ad0BqAFRAf8BuQGDATsB/wwA
A1QBrgE+AYQBQQH/ATwBggE/Af8BPgGEAUEB/wFZAWoBWQHrEAADPwFsAa0CrwH6AdIB1gHUAf8BzAHR
Ac8B/wHHAcwBygH/AcIByAHFAf8BvQHDAcAB/wG3Ab4BuwH/AbcBvgG7Af8BwQHHAcUB/wNjAdoDCgEO
DAADTAGTAbMBtwG1AfwBxQHLAcgB/wHFAcsByAH/AcUBywHIAf8BxQHLAcgB/wHIAc4BywH/AcwB0QHO
Af8BzwHUAdIB/wHTAdcB1QH/AdYB2gHYAf8B3wHiAeEB/wNoAeIDAwEEBAABhAFsAU8B8gG5AYQBOgH/
AbcBgQE3Af8B2gG3AYcB/wHGAY8BPAH/AbgBgwE7Af8BugGEAToB/wGGAW4BUwHxBAADGAEiAyMBMwMj
ATMDGAEiFAABtgGBATYB/wHwAdgBtQH/AdkBowFLAf8BuQGDATsB/wwAAxkEIwEzAyMBMwMjATMDIwEz
AyMBMwMZASMMAANUAa4BygHOAcwB/gHOAdMB0QH/AckBzgHMAf8BxAHKAccB/wG/AcUBwgH/AboBwAG+
Af8BugHBAb4B/wN7Ae0DKAE8EAADIAEuAz8BbAM/AWwDPwFsAz4BawM+AWoDPgFqAz4BagM9AWkDPQFp
Az0BaAM9AWgDOwFkAwQBBgQAAbkBhAE7Af8B6AHRAawB/wHGAY8BNQH/AcYBjwE3Af8BxgGQATgB/wHG
AY8BNQH/AewB1QGyAf8BwwGEATkB/wQAAVYBWAFWAbwBQAGFAUMB/wFBAYUBQwH/AVcBWgFXAb0UAAG2
AYABNQH/AfEB3AG8Af8B1QGfAUYB/wG5AYQBOwH/DAABVgFZAVYBvgFAAYUBQgH/AUEBhAFBAf8BQQGE
AUEB/wFCAYQBQgH/AUIBhQFEAf8BWAFaAVgBwAwAAwUBBwNgAtkB3AHbAf8BywHQAc4B/wHGAcsByQH/
Ab0BxAHBAf8BuAG/AbwB/wGkAqYB+gNIAYNUAAG4AYIBNwH/AegB0AGtAf8BwgGLAS8B/wHCAYsBLwH/
AegB0AGtAf8BuQGCATcB/wgAAT0BhQFCAf8BngHpAcoB/wFKAcwBmAH/AUEBhQFDAf8UAAG3AYEBNQH/
AfAB2wG7Af8B0AGZAT8B/wG6AYMBOgH/DAABPwGEAUIB/wGeAegByQH/AUcByAGSAf8BSQHIAZMB/wFK
AcgBlAH/AUwBzAGZAf8BQQGFAUMB/xAAAxwBJwF7AXwBewHrAcsB0AHOAf8BuQHAAb0B/wG2Ab0BugH/
AcUBygHIAf8DWQG/XAABtwGBATcB/wHoAdEBsAH/AegB0QGwAf8BuAGBATcB/wwAAT0BhAFBAf8BvAHr
Ad4B/wG9AesB3wH/AT8BhQFCAf8UAAG4AYIBNwH/Ae8B2wG7Af8B6gHQAakB/wG6AYMBOQH/DAABPgGE
AUEB/wG7AeoB3QH/AbgB5gHYAf8BuQHmAdgB/wG6AecB2QH/Ab0B6wHeAf8BPwGFAUIB/xQAAz0BaAGN
AZIBjwH1AbcBvgG7Af8BvgHFAcIB/wNkAd4DDQESYAABuAGDATkB/wG4AYMBOQH/EAABUwFVAVMBsAE+
AYQBQQH/AT4BhAFBAf8BVwFoAVgB7xQAAlUBUwGwAbgBggE4Af8BuAGDATgB/wJVAVMBsAwAAVMBVQFT
AbABPgGEAUEB/wE8AYIBPgH/ATwBggE+Af8BPAGCAT4B/wE+AYQBQQH/AVcBaAFYAe8YAANSAakBtwG8
AboB/gF+AX8BfgHvAy0BRvAAAwUBBwNbAcQDRgF+/wB1AAMTARoBLAIrAUMBLAIrAUMBLAIrAUPwAANV
AbIBQgHiAYwB/wFBAeEBiQH/ATMByAFbAf/wAANVAbIBNgHUAVYB/wEtAcsBPQH/ATMByQFbAf+wAAMM
ARADPQFoAyoBQDQAA1UBsgE+AdoBYAH/AS4BzAE/Af8BMwHKAVsB/1wAAxABFgMXASADFwEgAxcBIAMX
ASADFwEgAxcBIAMXASADFwEgAxcBIAMXASADFwEgAxcBIAMJAQwYAAMKAQ4DKAE8A14B1QNMAZADEwEa
AwMBBCwAA1UBsgFKAeMBgQH/AToB1AFMAf8BNAHLAVwB/1wAA0gBgwNZAb8DWQG/A1kBvwNZAb8DWQG/
A1kBvwNZAb8DWQG/A1kBvwNZAb8DWQG/A1kBvwMuAUgYAAM0AVQDWQHHA18B8wNcAd8DUAGbAxIBGBwA
AT4BfwE8Af4BPQHTAWIB/wE9AdQBZAH/AT4B1AFkAf8BPQHTAWMB/wFWAeoBhAH/AUkB3wFcAf8BRwHj
AZAB/wE0AcoBWgH/ATIByAFZAf8BMQHGAVcB/wExAcUBVwH/AzABTAwAA0gBhAI5AdMB/wI7AdQB/wI9
AdQB/wI+AdMB/wI9AdAB/wI6AcwB/wI2AccB/wIyAcMB/wIwAcIB/wIwAcIB/wIfAagB/wwAAz8BbQNb
AcMDXQH/A10B/wNdAf8DXQH/A10B/wNdAf8DXQH/A10B/wNdAf8DZAHnA1MBpQMoATwQAAMEAQYDLgFI
A1QBpgNdAf8DXQH/A10B/wNhAeEDQgF0Ax0BKhgAAUEBfwFBAf4BUgHaAWUB/wFbAeQBgQH/AWEB7AGG
Af8BZAHwAYoB/wFhAe8BhwH/AVgB6gGBAf8BSwHhAV8B/wE+AdcBUAH/ATIBzgFDAf8BLQHLAT0B/wFA
AeABhwH/AzABTAwAA0gBhAJLAdcB/wJSAdYB/wJeAeQB/wJmAe4B/wJmAfAB/wJaAekB/wJHAdwB/wI3
AdAB/wIyAcwB/wIyAcwB/wIpAbcB/xAAAzoBYANdAf8DXQH/A10B/wNdAf8DXQH/A10B/wNdAf8DXQH/
A10B/wNZAb8DDAEQFAADDAEQA1kBvwNdAf8DXQH/A10B/wNdAf8DXQH/A10B/wNAAXAYAAFBAYABQQH+
AUsB1gGBAf8BUwHfAYUB/wFaAecBjQH/AV8B7gGTAf8BZAHvAYoB/wFiAfABiAH/AVoB7AGGAf8BTwHn
AYIB/wFEAd4BZgH/AToB1wFbAf8BQQHhAYoB/wMwAUwMAANIAYQCTAHaAf8CUwHdAf8CXQHoAf8CYwHw
Af8CYwHyAf8CWgHsAf8CSwHiAf8CPQHYAf8COAHUAf8COAHUAf8CKQG3Af8QAAMaASQDPgFqA10B1wNd
Af8DXQH/A10B/wNdAf8DXQH/A10B/wNUAaYDLgFIAwQBBhAAAygBPANTAaUDZAHnA10B/wNdAf8DXQH/
A10B/wNdAf8DXQH/A1wByQNDAXcDBwEKEAABVgJVAbEDVQG1A1UBtQNVAbUDVwHoAV8B7QGTAf8BZAHv
AYkB/wFAAdYBgQH/A1UBtQNVAbUDVQG1A1UBtQMYASEMAAMtAUYDVQG1A1UBtQNVAbUDVQG1A1UBtQNV
AbUDVQG1A1UBtQNVAbUDVQG1AVYCVQG0FAADCQEMA0wBjwNfAdsDXQH/A10B/wNdAf8DXwHzA1kBxwM0
AVQUAAMfASwDSQGIA10B/wNdAf8DXQH/A10B/wNdAf8DXQH/A10B/wNdAf8DXQH/A1wBzwMwAUwDEgEY
HAADVQGyAVgB5QGLAf8BXwHoAYMB/wFAAdYBgQH/ZAADAQECAxIBGANHAYIDXQH/A10B/wNdAf8DXgHV
AygBPAMKAQ4UAANOAZkDYAHrA10B/wNdAf8DXQH/A10B/wNdAf8DXQH/A10B/wNdAf8DXQH/A2YB9wNh
AeEDNAFUHAADVQGyAU8B2wGBAf8BVgHeAYAB/wE/AdUBaAH/bAADJgE4A0wBkANkAecDWgHAAz0BaAMM
ARAYAAM2AVgDRwGAA0cBgANHAYADRwGAA0cBgANHAYADRwGAA0cBgANHAYADRwGAA0cBgANHAYADIQEw
HAADVQGyAUYB0gFnAf8BSwHTAV4B/wE+AdQBZgH/cAADFAEcA1UBtQNAAXB0AANUAasBIQG5ASYB/wEh
AbgBJgH/AR8BtQEiAf9wAAMGAQgDIwE0AxcBIP8A/wBeAAFCAU0BPgcAAT4DAAEoAwABQAMAATADAAEB
AQABAQUAAYABARYAA/8BAAT/BAAE/wQABP8EAAGcARgBnAEYBAABmAEYAZgBGAQAAZgBgAGYAYAEAAGA
AYEBgAGBBAABgQHDAYEBwwQAAYABwwGAAcMEAAGYAYEBmAGBBAAEgAQAAYEBCAGBAQgEAAGDARgBgwEY
BAAE/wQABP8EAAT/BAABgwGAAecBhwL/AeABBwGDAYABwwGHAv8B8AEHAcMBgAGBAYcC/wH8AT8BwwGA
AQABhwL/AfgBPwHDAYABAAGHAv8B8AEfAcMBgwEAAYMBwAEHAfABDwHDAYMBwwGDAfgBHwHgAQcBwwGD
AcMBgwGAAQEBwAEHAcMBgwHDAYMBgAEDAYABAwEAAYMBwwGDAcABAwGAAQEBAAGHAcMBgAHgAQcBgAEB
AQABhwHDAYAB4AEPAv8BgQGHAcMBgAHwAR8C/wHDAYcBwwGAAfgBHwL/AecBhwHDAYAB/AE/Bv8B/AF/
Cv8B/AE/Bv8B/AE/Bv8B/AE/BP8B/AF/AfwBPwL/AYABAQH4AR8B/AE/Av8BgAEBAfgBHwHAAQEBwAED
AYABAQHgAQ8BwAEBAcABAwHAAQMB4AEPAcABAQHAAQMBwAEDAcABAwHAAQEBwAEDAeABDwGAAQEB/AE/
Av8B4AEPAYABAQH8AT8C/wH4AR8BgAEBAfwBPwL/AfwBfwL/AfwBPwL/AfwBfxL/Cw==
</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="label1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Left</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 272</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>37, 13</value>
</data>
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Filters:</value>
</data>
<data name="&gt;&gt;label1.Name" xml:space="preserve">
<value>label1</value>
</data>
<data name="&gt;&gt;label1.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>12</value>
</data>
<data name="btnCancel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Right</value>
</data>
<data name="btnCancel.Location" type="System.Drawing.Point, System.Drawing">
<value>397, 418</value>
</data>
<data name="btnCancel.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="btnCancel.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="btnCancel.Text" xml:space="preserve">
<value>Cancel</value>
</data>
<data name="&gt;&gt;btnCancel.Name" xml:space="preserve">
<value>btnCancel</value>
</data>
<data name="&gt;&gt;btnCancel.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btnCancel.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;btnCancel.ZOrder" xml:space="preserve">
<value>13</value>
</data>
<data name="label2.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Left</value>
</data>
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 242</value>
</data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>212, 13</value>
</data>
<data name="label2.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Use context menu to add and remove filters</value>
</data>
<data name="&gt;&gt;label2.Name" xml:space="preserve">
<value>label2</value>
</data>
<data name="&gt;&gt;label2.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label2.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
<value>9</value>
</data>
<data name="lvFilters.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Left, Right</value>
</data>
<metadata name="ctxFilters.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>332, 17</value>
</metadata>
<data name="removeFilterToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>146, 22</value>
</data>
<data name="removeFilterToolStripMenuItem.Text" xml:space="preserve">
<value>Remove Filter</value>
</data>
<data name="ctxFilters.Size" type="System.Drawing.Size, System.Drawing">
<value>147, 26</value>
</data>
<data name="&gt;&gt;ctxFilters.Name" xml:space="preserve">
<value>ctxFilters</value>
</data>
<data name="&gt;&gt;ctxFilters.Type" xml:space="preserve">
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="lvFilters.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 289</value>
</data>
<data name="lvFilters.Size" type="System.Drawing.Size, System.Drawing">
<value>461, 123</value>
</data>
<data name="lvFilters.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="&gt;&gt;lvFilters.Name" xml:space="preserve">
<value>lvFilters</value>
</data>
<data name="&gt;&gt;lvFilters.Type" xml:space="preserve">
<value>System.Windows.Forms.ListView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lvFilters.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;lvFilters.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<metadata name="scanWorker.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>220, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="lbTotalSize.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Right</value>
</data>
<data name="lbTotalSize.ImageAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>TopLeft</value>
</data>
<data name="lbTotalSize.Location" type="System.Drawing.Point, System.Drawing">
<value>324, 242</value>
</data>
<data name="lbTotalSize.Size" type="System.Drawing.Size, System.Drawing">
<value>148, 18</value>
</data>
<data name="lbTotalSize.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
</data>
<data name="lbTotalSize.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>TopRight</value>
</data>
<data name="&gt;&gt;lbTotalSize.Name" xml:space="preserve">
<value>lbTotalSize</value>
</data>
<data name="&gt;&gt;lbTotalSize.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbTotalSize.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;lbTotalSize.ZOrder" xml:space="preserve">
<value>11</value>
</data>
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 11</value>
</data>
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
<value>101, 13</value>
</data>
<data name="label3.TabIndex" type="System.Int32, mscorlib">
<value>12</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Files to be included:</value>
</data>
<data name="&gt;&gt;label3.Name" xml:space="preserve">
<value>label3</value>
</data>
<data name="&gt;&gt;label3.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label3.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;label3.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="tbSearch.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Right</value>
</data>
<data name="tbSearch.Location" type="System.Drawing.Point, System.Drawing">
<value>321, 4</value>
</data>
<data name="tbSearch.Size" type="System.Drawing.Size, System.Drawing">
<value>156, 20</value>
</data>
<data name="tbSearch.TabIndex" type="System.Int32, mscorlib">
<value>13</value>
</data>
<data name="&gt;&gt;tbSearch.Name" xml:space="preserve">
<value>tbSearch</value>
</data>
<data name="&gt;&gt;tbSearch.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;tbSearch.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;tbSearch.ZOrder" xml:space="preserve">
<value>10</value>
</data>
<data name="btnSearch.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Right</value>
</data>
<data name="btnSearch.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
@@ -299,6 +567,30 @@
DjIHM32Q3wAAAAAASUVORK5CYII=
</value>
</data>
<data name="btnSearch.Location" type="System.Drawing.Point, System.Drawing">
<value>291, 1</value>
</data>
<data name="btnSearch.Size" type="System.Drawing.Size, System.Drawing">
<value>25, 25</value>
</data>
<data name="btnSearch.TabIndex" type="System.Int32, mscorlib">
<value>14</value>
</data>
<data name="&gt;&gt;btnSearch.Name" xml:space="preserve">
<value>btnSearch</value>
</data>
<data name="&gt;&gt;btnSearch.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btnSearch.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;btnSearch.ZOrder" xml:space="preserve">
<value>8</value>
</data>
<data name="btnClearSearch.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Right</value>
</data>
<data name="btnClearSearch.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
R0lGODlhEAAQAIZ1AP75+f3j4/jFxv7k5P/u7v74+OovMfddYPhfYv/6+v7k5f/7+/93evhiZP97fv9b
@@ -314,6 +606,147 @@
yDFjQMDAMiFIYK1T4E3lgjY2CyxgWazpgQEBADs=
</value>
</data>
<data name="btnClearSearch.Location" type="System.Drawing.Point, System.Drawing">
<value>458, 6</value>
</data>
<data name="btnClearSearch.Size" type="System.Drawing.Size, System.Drawing">
<value>16, 16</value>
</data>
<data name="btnClearSearch.TabIndex" type="System.Int32, mscorlib">
<value>15</value>
</data>
<data name="btnClearSearch.Visible" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="&gt;&gt;btnClearSearch.Name" xml:space="preserve">
<value>btnClearSearch</value>
</data>
<data name="&gt;&gt;btnClearSearch.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btnClearSearch.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;btnClearSearch.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="lvFiles.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Bottom, Left, Right</value>
</data>
<data name="chFile.Text" xml:space="preserve">
<value>Filename</value>
</data>
<data name="chFile.Width" type="System.Int32, mscorlib">
<value>116</value>
</data>
<data name="chFileExt.Text" xml:space="preserve">
<value>Ext</value>
</data>
<data name="chFileExt.Width" type="System.Int32, mscorlib">
<value>47</value>
</data>
<data name="chSize.Text" xml:space="preserve">
<value>Size</value>
</data>
<data name="chSize.Width" type="System.Int32, mscorlib">
<value>76</value>
</data>
<data name="chPath.Text" xml:space="preserve">
<value>Path</value>
</data>
<data name="chPath.Width" type="System.Int32, mscorlib">
<value>192</value>
</data>
<data name="lvFiles.Location" type="System.Drawing.Point, System.Drawing">
<value>15, 32</value>
</data>
<data name="lvFiles.Size" type="System.Drawing.Size, System.Drawing">
<value>462, 205</value>
</data>
<data name="lvFiles.TabIndex" type="System.Int32, mscorlib">
<value>16</value>
</data>
<data name="&gt;&gt;lvFiles.Name" xml:space="preserve">
<value>lvFiles</value>
</data>
<data name="&gt;&gt;lvFiles.Type" xml:space="preserve">
<value>System.Windows.Forms.ListView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lvFiles.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;lvFiles.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="lbLoading.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
</data>
<data name="lbLoading.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 15.75pt</value>
</data>
<data name="lbLoading.Location" type="System.Drawing.Point, System.Drawing">
<value>28, 98</value>
</data>
<data name="lbLoading.Size" type="System.Drawing.Size, System.Drawing">
<value>427, 36</value>
</data>
<data name="lbLoading.TabIndex" type="System.Int32, mscorlib">
<value>17</value>
</data>
<data name="lbLoading.Text" xml:space="preserve">
<value>Scanning files, please wait....</value>
</data>
<data name="lbLoading.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleCenter</value>
</data>
<data name="&gt;&gt;lbLoading.Name" xml:space="preserve">
<value>lbLoading</value>
</data>
<data name="&gt;&gt;lbLoading.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;lbLoading.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;lbLoading.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="btnOK.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Right</value>
</data>
<data name="btnOK.Location" type="System.Drawing.Point, System.Drawing">
<value>312, 418</value>
</data>
<data name="btnOK.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="btnOK.TabIndex" type="System.Int32, mscorlib">
<value>18</value>
</data>
<data name="btnOK.Text" xml:space="preserve">
<value>OK</value>
</data>
<data name="&gt;&gt;btnOK.Name" xml:space="preserve">
<value>btnOK</value>
</data>
<data name="&gt;&gt;btnOK.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btnOK.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;btnOK.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 13</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>486, 453</value>
</data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAwAMDAQAAEABABoBgAAxgAAACAgEAABAAQA6AIAAC4HAAAYGBAAAQAEAOgBAAAWCgAAEBAQAAEA
@@ -817,4 +1250,109 @@
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAEAAA==
</value>
</data>
<data name="$this.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>400, 400</value>
</data>
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
<value>CenterParent</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Test Search Selection</value>
</data>
<data name="&gt;&gt;miInclude.Name" xml:space="preserve">
<value>miInclude</value>
</data>
<data name="&gt;&gt;miInclude.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;miIncludeFileName.Name" xml:space="preserve">
<value>miIncludeFileName</value>
</data>
<data name="&gt;&gt;miIncludeFileName.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;miIncludeFileExt.Name" xml:space="preserve">
<value>miIncludeFileExt</value>
</data>
<data name="&gt;&gt;miIncludeFileExt.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;miIncludeFilePath.Name" xml:space="preserve">
<value>miIncludeFilePath</value>
</data>
<data name="&gt;&gt;miIncludeFilePath.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;miExclude.Name" xml:space="preserve">
<value>miExclude</value>
</data>
<data name="&gt;&gt;miExclude.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;miExcludeFileName.Name" xml:space="preserve">
<value>miExcludeFileName</value>
</data>
<data name="&gt;&gt;miExcludeFileName.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;miExcludeFileExt.Name" xml:space="preserve">
<value>miExcludeFileExt</value>
</data>
<data name="&gt;&gt;miExcludeFileExt.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;miExcludeFilePath.Name" xml:space="preserve">
<value>miExcludeFilePath</value>
</data>
<data name="&gt;&gt;miExcludeFilePath.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;imageList.Name" xml:space="preserve">
<value>imageList</value>
</data>
<data name="&gt;&gt;imageList.Type" xml:space="preserve">
<value>System.Windows.Forms.ImageList, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;removeFilterToolStripMenuItem.Name" xml:space="preserve">
<value>removeFilterToolStripMenuItem</value>
</data>
<data name="&gt;&gt;removeFilterToolStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;scanWorker.Name" xml:space="preserve">
<value>scanWorker</value>
</data>
<data name="&gt;&gt;scanWorker.Type" xml:space="preserve">
<value>System.ComponentModel.BackgroundWorker, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;chFile.Name" xml:space="preserve">
<value>chFile</value>
</data>
<data name="&gt;&gt;chFile.Type" xml:space="preserve">
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;chFileExt.Name" xml:space="preserve">
<value>chFileExt</value>
</data>
<data name="&gt;&gt;chFileExt.Type" xml:space="preserve">
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;chSize.Name" xml:space="preserve">
<value>chSize</value>
</data>
<data name="&gt;&gt;chSize.Type" xml:space="preserve">
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;chPath.Name" xml:space="preserve">
<value>chPath</value>
</data>
<data name="&gt;&gt;chPath.Type" xml:space="preserve">
<value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>TestSearchSelection</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>
@@ -169,7 +169,7 @@
<value>NoControl</value>
</data>
<data name="ThreadPriorityEnabled.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
<value>0, 2</value>
</data>
<data name="ThreadPriorityEnabled.Size" type="System.Drawing.Size, System.Drawing">
<value>108, 17</value>
+113 -20
View File
@@ -64,6 +64,16 @@ namespace Duplicati.GUI
/// </summary>
private LiveControlState m_state;
/// <summary>
/// A value that indicates if the current pause state is caused by being suspended
/// </summary>
private bool m_pausedForSuspend = false;
/// <summary>
/// The time to pause for, used to ensure that a user set pause can override the suspend pause
/// </summary>
private DateTime m_suspendMinimumPause = new DateTime(0);
/// <summary>
/// Gets the current state for the control
/// </summary>
@@ -142,6 +152,11 @@ namespace Duplicati.GUI
/// </summary>
private System.Windows.Forms.Timer m_waitTimer;
/// <summary>
/// The time that the current pause is expected to expire
/// </summary>
private DateTime m_waitTimeExpiration = new DateTime(0);
/// <summary>
/// Constructs a new instance of the LiveControl
/// </summary>
@@ -153,8 +168,10 @@ namespace Duplicati.GUI
m_waitTimer.Tick += new EventHandler(m_waitTimer_Tick);
if (!string.IsNullOrEmpty(settings.StartupDelayDuration) && settings.StartupDelayDuration != "0")
{
m_waitTimer.Interval = (int)Duplicati.Library.Utility.Timeparser.ParseTimeSpan(settings.StartupDelayDuration).TotalMilliseconds;
TimeSpan ts = Duplicati.Library.Utility.Timeparser.ParseTimeSpan(settings.StartupDelayDuration);
m_waitTimer.Interval = (int)ts.TotalMilliseconds;
m_waitTimer.Enabled = true;
m_waitTimeExpiration = DateTime.Now + ts;
m_state = LiveControlState.Paused;
}
@@ -163,6 +180,13 @@ namespace Duplicati.GUI
m_downloadLimit = Library.Utility.Sizeparser.ParseSize(settings.DownloadSpeedLimit, "kb");
if (!string.IsNullOrEmpty(settings.UploadSpeedLimit))
m_uploadLimit = Library.Utility.Sizeparser.ParseSize(settings.UploadSpeedLimit, "kb");
try
{
if (!Library.Utility.Utility.IsClientLinux)
RegisterHibernateMonitor();
}
catch { }
}
/// <summary>
@@ -172,23 +196,10 @@ namespace Duplicati.GUI
/// <param name="e">An unused event argument</param>
private void m_waitTimer_Tick(object sender, EventArgs e)
{
m_waitTimeExpiration = new DateTime(0);
Resume();
}
/// <summary>
/// Internal helper to reset the timeout timer
/// </summary>
/// <param name="timeout">The time to wait</param>
private void ResetTimer(string timeout)
{
m_waitTimer.Enabled = false;
if (!string.IsNullOrEmpty(timeout))
{
m_waitTimer.Interval = ((int)Duplicati.Library.Utility.Timeparser.ParseTimeSpan(timeout).TotalMilliseconds);
m_waitTimer.Enabled = true;
}
}
/// <summary>
/// Pauses the backups until resumed
/// </summary>
@@ -218,19 +229,101 @@ namespace Duplicati.GUI
}
}
/// <summary>
/// Suspends the backups for a given period
/// </summary>
/// <param name="timeout">The duration to wait</param>
public void Pause(TimeSpan timeout)
{
Pause();
m_waitTimer.Enabled = false;
m_waitTimer.Interval = ((int)timeout.TotalMilliseconds);
m_waitTimeExpiration = DateTime.Now + TimeSpan.FromMilliseconds(m_waitTimer.Interval);
m_waitTimer.Enabled = true;
}
/// <summary>
/// Suspends the backups for a given period
/// </summary>
/// <param name="timeout">The duration to wait</param>
public void Pause(string timeout)
{
if (m_state == LiveControlState.Running)
Pause(Duplicati.Library.Utility.Timeparser.ParseTimeSpan(timeout));
}
/// <summary>
/// Method for calling a Win32 API
/// </summary>
private void RegisterHibernateMonitor()
{
Microsoft.Win32.SystemEvents.PowerModeChanged += new Microsoft.Win32.PowerModeChangedEventHandler(SystemEvents_PowerModeChanged);
}
/// <summary>
/// Method for calling a Win32 API
/// </summary>
private void UnregisterHibernateMonitor()
{
Microsoft.Win32.SystemEvents.PowerModeChanged -= new Microsoft.Win32.PowerModeChangedEventHandler(SystemEvents_PowerModeChanged);
}
/// <summary>
/// A monitor for detecting when the system hibernates or resumes
/// </summary>
/// <param name="sender">Unused sender parameter</param>
/// <param name="_e">The event information</param>
private void SystemEvents_PowerModeChanged(object sender, object _e)
{
Microsoft.Win32.PowerModeChangedEventArgs e = _e as Microsoft.Win32.PowerModeChangedEventArgs;
if (e == null)
return;
if (e.Mode == Microsoft.Win32.PowerModes.Suspend)
{
Pause();
m_waitTimer.Enabled = false;
m_waitTimer.Interval = ((int)Duplicati.Library.Utility.Timeparser.ParseTimeSpan(timeout).TotalMilliseconds);
m_waitTimer.Enabled = true;
//If we are running, register as being paused due to suspending
if (this.m_state == LiveControlState.Running)
{
this.Pause();
m_pausedForSuspend = true;
m_suspendMinimumPause = new DateTime(0);
}
else
{
if (m_waitTimeExpiration.Ticks != 0)
{
m_pausedForSuspend = true;
m_suspendMinimumPause = m_waitTimeExpiration;
m_waitTimeExpiration = new DateTime(0);
m_waitTimer.Enabled = false;
}
}
}
else if (e.Mode == Microsoft.Win32.PowerModes.Resume)
{
//If we have been been paused due to suspending, we un-pause now
if (m_pausedForSuspend)
{
long delayTicks = (m_suspendMinimumPause - DateTime.Now).Ticks;
Datamodel.ApplicationSettings appset = new Datamodel.ApplicationSettings(Program.DataConnection);
if (!string.IsNullOrEmpty(appset.StartupDelayDuration) && appset.StartupDelayDuration != "0")
delayTicks = Math.Max(delayTicks, Library.Utility.Timeparser.ParseTimeSpan(appset.StartupDelayDuration).Ticks);
if (delayTicks > 0)
{
this.Pause(TimeSpan.FromTicks(delayTicks));
}
else
{
this.Resume();
}
}
m_pausedForSuspend = false;
m_suspendMinimumPause = new DateTime(0);
}
}
}
}
+1
View File
@@ -73,6 +73,7 @@
this.quitToolStripMenuItem});
this.TrayMenu.Name = "TrayMenu";
resources.ApplyResources(this.TrayMenu, "TrayMenu");
this.TrayMenu.LocationChanged += new System.EventHandler(this.TrayMenu_LocationChanged);
//
// statusToolStripMenuItem
//
+50 -3
View File
@@ -228,13 +228,24 @@ namespace Duplicati.GUI
return;
}
Datamodel.ApplicationSettings.NotificationLevel level = m_settings.BallonNotificationLevel;
string name = "";
//Dirty read of the instance variable
try { name = Program.WorkThread.CurrentTask.Schedule.Name; }
catch {}
catch { }
Datamodel.ApplicationSettings.NotificationLevel level;
try { level = m_settings.BallonNotificationLevel; }
catch
{
m_settings = new Datamodel.ApplicationSettings(Program.DataConnection);
try { level = m_settings.BallonNotificationLevel; }
catch
{
//TODO: Should find the cause for this, but at least we do not crash the process
return;
}
}
if (state == DuplicatiRunner.RunnerState.Started && (level == Duplicati.Datamodel.ApplicationSettings.NotificationLevel.StartAndStop || level == Duplicati.Datamodel.ApplicationSettings.NotificationLevel.Start || level == Duplicati.Datamodel.ApplicationSettings.NotificationLevel.Continous))
@@ -754,5 +765,41 @@ namespace Duplicati.GUI
{
ShowStatus();
}
private void TrayMenu_LocationChanged(object sender, EventArgs e)
{
// This is a workaround by Jenlehma for not displaying the context menu on the right screen:
// http://code.google.com/p/duplicati/issues/detail?id=600
// We assume that only Windows is broken here
if (!Duplicati.Library.Utility.Utility.IsClientLinux)
{
// First we get the top/left position of the TrayMenu and the current mouse position
Point TrayMenuTopLeft = new Point(TrayMenu.Left, TrayMenu.Top);
Point mousePos = Cursor.Position;
// Now get the screen objects of both coordinates (mouse / traymenu)
Screen ScrContextMenu = Screen.FromPoint(TrayMenuTopLeft);
Screen ScrCursor = Screen.FromPoint(mousePos);
// if the mouse and the tray menu is on different screens ...
if (ScrContextMenu.DeviceName != ScrCursor.DeviceName)
{
// if the mouse sits exactly on the top or the bottom of the menu, the menu might have an offset on the x-axis
if (TrayMenuTopLeft.Y + TrayMenu.Height == mousePos.Y || TrayMenuTopLeft.Y == mousePos.Y)
{
if (TrayMenuTopLeft.X < mousePos.X)
TrayMenu.Left = mousePos.X;
else if (TrayMenuTopLeft.X > mousePos.X)
TrayMenu.Left = mousePos.X - TrayMenu.Width;
}
else
{
// if the y-axis is off .. just move that.
TrayMenu.Top = mousePos.Y;
}
}
}
}
}
}
+25 -12
View File
@@ -117,12 +117,13 @@ namespace Duplicati.GUI
//We add it last, to allow the user to override with other versions
if (!Library.Utility.Utility.IsClientLinux)
{
string wintools = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), "win-tools");
Environment.SetEnvironmentVariable("PATH",
Environment.GetEnvironmentVariable("PATH") +
System.IO.Path.PathSeparator.ToString() +
System.IO.Path.Combine(
System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location),
"win-tools")
wintools +
System.IO.Path.PathSeparator.ToString() +
System.IO.Path.Combine(wintools, "gpg") //GPG needs to be in a subfolder for wrapping reasons
);
}
@@ -252,10 +253,6 @@ namespace Duplicati.GUI
try
{
DatabasePath = System.IO.Path.Combine(Program.DATAFOLDER, "Duplicati.sqlite");
if (!System.IO.Directory.Exists(System.IO.Path.GetDirectoryName(DatabasePath)))
System.IO.Directory.CreateDirectory(System.IO.Path.GetDirectoryName(DatabasePath));
#if DEBUG
//Default is to not use encryption for debugging
Program.UseDatabaseEncryption = commandlineOptions.ContainsKey("unencrypted-database") ? !Library.Utility.Utility.ParseBoolOption(commandlineOptions, "unencrypted-database") : false;
@@ -263,12 +260,8 @@ namespace Duplicati.GUI
//Default is to use encryption for release
Program.UseDatabaseEncryption = !Library.Utility.Utility.ParseBoolOption(commandlineOptions, "unencrypted-database");
#endif
con.ConnectionString = "Data Source=" + DatabasePath;
//Attempt to open the database, handling any encryption present
OpenDatabase(con);
DatabaseUpgrader.UpgradeDatabase(con, DatabasePath);
OpenSettingsDatabase(con, Program.DATAFOLDER);
}
catch (Exception ex)
{
@@ -383,6 +376,25 @@ namespace Duplicati.GUI
Duplicati.Library.Logging.Log.CurrentLog = null;
#endif
}
/// <summary>
/// Opens the application settings database, creating a new db if missing
/// </summary>
/// <param name="con">the db connection</param>
/// <param name="datafolder">the database folder path</param>
/// <param name="dbfile">the database file name within the data folder; defaults to "Duplicati.sqlite"</param>
internal static void OpenSettingsDatabase(System.Data.IDbConnection con, string datafolder, string dbfile = "Duplicati.sqlite") {
DatabasePath = System.IO.Path.Combine(datafolder, dbfile);
if (!System.IO.Directory.Exists(System.IO.Path.GetDirectoryName(DatabasePath)))
System.IO.Directory.CreateDirectory(System.IO.Path.GetDirectoryName(DatabasePath));
con.ConnectionString = "Data Source=" + DatabasePath;
//Attempt to open the database, handling any encryption present
OpenDatabase(con);
DatabaseUpgrader.UpgradeDatabase(con, DatabasePath);
}
/// <summary>
/// Handles a change in the LiveControl and updates the Runner
@@ -548,6 +560,7 @@ namespace Duplicati.GUI
return new Duplicati.Library.Interface.ICommandLineArgument[] {
new Duplicati.Library.Interface.CommandLineArgument("help", Duplicati.Library.Interface.CommandLineArgument.ArgumentType.Boolean, Strings.Program.HelpCommandDescription, Strings.Program.HelpCommandDescription),
new Duplicati.Library.Interface.CommandLineArgument("run-backup", Duplicati.Library.Interface.CommandLineArgument.ArgumentType.String, Strings.Program.RunbackupCommandDescription, Strings.Program.RunbackupCommandDescription),
new Duplicati.Library.Interface.CommandLineArgument("run-backup-group", Duplicati.Library.Interface.CommandLineArgument.ArgumentType.String, Strings.Program.RunbackupGroupCommandDescription, Strings.Program.RunbackupGroupCommandDescription),
new Duplicati.Library.Interface.CommandLineArgument("full", Duplicati.Library.Interface.CommandLineArgument.ArgumentType.String, Strings.Program.FullCommandDescription, Strings.Program.FullCommandDescription),
new Duplicati.Library.Interface.CommandLineArgument("resume", Duplicati.Library.Interface.CommandLineArgument.ArgumentType.String, Strings.Program.ResumeCommandDescription, Strings.Program.ResumeCommandDescription),
new Duplicati.Library.Interface.CommandLineArgument("pause", Duplicati.Library.Interface.CommandLineArgument.ArgumentType.String, Strings.Program.PauseCommandDescription, Strings.Program.PauseCommandDescription),
+5
View File
@@ -50,3 +50,8 @@ using System.Runtime.InteropServices;
//
[assembly: AssemblyVersion("1.0.1.276")]
[assembly: AssemblyFileVersion("1.0.1.276")]
//
// Make this assembly amenable to testing
//
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Duplicati_Test,PublicKey=0024000004800000940000000602000000240000525341310004000001000100d1ce9cf2ab57d00de3083722ec78ca7b169236c1150350789f131a480c65ad27d3e59ec9c2cca53f84b4f0f6a7f4f59e6d08e8556ccaa54d24894d41813bdf61db969bfaa32c445995afc03e23a137c6328f7dabadeb17b8e5cc351f399334f3f6f2cb1b19f02af0e752116f4bdf808ad51f3340a1a0701a5455cb84a3a5eb9e")]
+27 -5
View File
@@ -45,11 +45,10 @@ namespace Duplicati.GUI
//Default is to use the pinvoke version which requires a native .dll/.so
string assemblyPath = System.IO.Path.Combine(basePath, "pinvoke");
//If we run on windows with MS.Net we can use the mixed mode assemblies
if (!Duplicati.Library.Utility.Utility.IsClientLinux && !Duplicati.Library.Utility.Utility.IsMono)
if (!Duplicati.Library.Utility.Utility.IsMono)
{
//On my x64 system, 32bit appears to work correctly as 32 bit, where loading the 64bit dll fails
if (IntPtr.Size == 8 /*|| (IntPtr.Size == 4 && Is32BitProcessOn64BitProcessor())*/)
//If we run with MS.Net we can use the mixed mode assemblies
if (Library.Utility.Utility.Is64BitProcess)
{
if (System.IO.File.Exists(System.IO.Path.Combine(System.IO.Path.Combine(basePath, "win64"), filename)))
assemblyPath = System.IO.Path.Combine(basePath, "win64");
@@ -59,7 +58,30 @@ namespace Duplicati.GUI
if (System.IO.File.Exists(System.IO.Path.Combine(System.IO.Path.Combine(basePath, "win32"), filename)))
assemblyPath = System.IO.Path.Combine(basePath, "win32");
}
}
} else {
//On Mono, we try to find the Mono version of SQLite
//This secrect commandline variable can be used to support older installations
if (System.Environment.GetEnvironmentVariable("DISABLE_MONO_DATA_SQLITE") == null)
{
try
{
Type t = System.Reflection.Assembly.Load("Mono.Data.Sqlite, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756").GetType("Mono.Data.Sqlite.SqliteConnection");
if (t != null && t.GetInterface("System.Data.IDbConnection", false) != null)
{
Version v = new Version((string)t.GetProperty("SQLiteVersion").GetValue(null, null));
if (v >= new Version(3, 6, 3))
{
m_type = t;
return m_type;
}
}
} catch (Exception ex){
Console.WriteLine(string.Format("Failed to load Mono.Data.Sqlite.SqliteConnection, reverting to built-in.{0} Error message: {1}", Environment.NewLine, ex.ToString()));
}
}
}
m_type = System.Reflection.Assembly.LoadFile(System.IO.Path.Combine(assemblyPath, filename)).GetType("System.Data.SQLite.SQLiteConnection");
}
+8 -8
View File
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.237
// Runtime Version:4.0.30319.235
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -61,7 +61,7 @@ namespace Duplicati.GUI.Strings {
}
/// <summary>
/// Looks up a localized string similar to While backup is running (and on errors/warnings).
/// Looks up a localized string similar to During backup, errors, warnings.
/// </summary>
internal static string BalloonNotification_Continous {
get {
@@ -70,7 +70,7 @@ namespace Duplicati.GUI.Strings {
}
/// <summary>
/// Looks up a localized string similar to On backup errors.
/// Looks up a localized string similar to Errors.
/// </summary>
internal static string BalloonNotification_Errors {
get {
@@ -79,7 +79,7 @@ namespace Duplicati.GUI.Strings {
}
/// <summary>
/// Looks up a localized string similar to No balloon notifications.
/// Looks up a localized string similar to No notifications.
/// </summary>
internal static string BalloonNotification_Off {
get {
@@ -88,7 +88,7 @@ namespace Duplicati.GUI.Strings {
}
/// <summary>
/// Looks up a localized string similar to On backup start (and errors/warnings).
/// Looks up a localized string similar to Start, errors, warnings.
/// </summary>
internal static string BalloonNotification_Start {
get {
@@ -97,7 +97,7 @@ namespace Duplicati.GUI.Strings {
}
/// <summary>
/// Looks up a localized string similar to On backup start and stop (and errors/warnings).
/// Looks up a localized string similar to Start, stop, errors, warnings.
/// </summary>
internal static string BalloonNotification_StartAndStop {
get {
@@ -106,7 +106,7 @@ namespace Duplicati.GUI.Strings {
}
/// <summary>
/// Looks up a localized string similar to On backup errors and warnings.
/// Looks up a localized string similar to Errors, warnings.
/// </summary>
internal static string BalloonNotification_Warnings {
get {
@@ -152,7 +152,7 @@ namespace Duplicati.GUI.Strings {
}
/// <summary>
/// Looks up a localized string similar to Duplicati Setup, version {0}.
/// Looks up a localized string similar to Duplicati Options, version {0}.
/// </summary>
internal static string DialogTitle {
get {
+7 -7
View File
@@ -118,22 +118,22 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="BalloonNotification_Continous" xml:space="preserve">
<value>While backup is running (and on errors/warnings)</value>
<value>While running, and on errors, warnings</value>
</data>
<data name="BalloonNotification_Errors" xml:space="preserve">
<value>On backup errors</value>
<value>On errors</value>
</data>
<data name="BalloonNotification_Off" xml:space="preserve">
<value>No balloon notifications</value>
<value>No notifications</value>
</data>
<data name="BalloonNotification_Start" xml:space="preserve">
<value>On backup start (and errors/warnings)</value>
<value>On start, errors, warnings</value>
</data>
<data name="BalloonNotification_StartAndStop" xml:space="preserve">
<value>On backup start and stop (and errors/warnings)</value>
<value>On start, stop, errors, warnings</value>
</data>
<data name="BalloonNotification_Warnings" xml:space="preserve">
<value>On backup errors and warnings</value>
<value>On errors, warnings</value>
</data>
<data name="CacheSize" xml:space="preserve">
<value>Cache size: {0}</value>
@@ -153,7 +153,7 @@
<comment>A string displayed to denote the current default language</comment>
</data>
<data name="DialogTitle" xml:space="preserve">
<value>Duplicati Setup, version {0}</value>
<value>Duplicati Options, version {0}</value>
<comment>The dialog title with version number</comment>
</data>
<data name="EncryptionModuleLoadError" xml:space="preserve">
+11 -2
View File
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.239
// Runtime Version:4.0.30319.1
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -180,6 +180,15 @@ namespace Duplicati.GUI.Strings {
}
}
/// <summary>
/// Looks up a localized string similar to Runs all backups in the group with the name supplied. If no group name is supplied, the available backups are displayed. If the group name is not found, an error message is displayed..
/// </summary>
internal static string RunbackupGroupCommandDescription {
get {
return ResourceManager.GetString("RunbackupGroupCommandDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to A serious error occured in Duplicati: {0}.
/// </summary>
+5 -2
View File
@@ -112,10 +112,10 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="AnotherInstanceDetected" xml:space="preserve">
<value>Another instance is running, and was notified</value>
@@ -187,4 +187,7 @@ Error message: {0}</value>
<data name="TraylessCommandDescription" xml:space="preserve">
<value>Runs Duplicati without showing the tray icon, closing the main window closes Duplicati</value>
</data>
<data name="RunbackupGroupCommandDescription" xml:space="preserve">
<value>Runs all backups in the group with the name supplied. If no group name is supplied, the available backups are displayed. If the group name is not found, an error message is displayed.</value>
</data>
</root>
+14 -10
View File
@@ -199,9 +199,9 @@ namespace Duplicati.GUI
options["encryption-module"] = this.Task.EncryptionModule;
if (string.IsNullOrEmpty(this.Task.Encryptionkey))
options.Add("no-encryption", "");
options["no-encryption"] = "";
else
options.Add("passphrase", this.Task.Encryptionkey);
options["passphrase"] = this.Task.Encryptionkey;
}
protected virtual void SetupTaskExtensions(Dictionary<string, string> options)
@@ -404,7 +404,7 @@ namespace Duplicati.GUI
{
string destination = base.GetConfiguration(options);
if (!string.IsNullOrEmpty(this.FullAfter))
if (!(string.IsNullOrEmpty(this.FullAfter) || options.ContainsKey("full-if-older-than")))
options.Add("full-if-older-than", this.FullAfter);
return destination;
@@ -668,12 +668,14 @@ namespace Duplicati.GUI
{
string destination = base.GetConfiguration(options);
options.Add("force", "");
if (!options.ContainsKey("force"))
options.Add("force", "");
if (!string.IsNullOrEmpty(When))
options.Add("restore-time", this.When);
options["restore-time"] = this.When;
if (!string.IsNullOrEmpty(this.SourceFiles))
options.Add("file-to-restore", this.SourceFiles);
options["file-to-restore"] = this.SourceFiles;
return destination;
}
@@ -709,8 +711,9 @@ namespace Duplicati.GUI
{
string destination = base.GetConfiguration(options);
options.Add("delete-all-but-n-full", this.FullCount.ToString());
options.Add("force", "");
options["delete-all-but-n-full"] = this.FullCount.ToString();
if (!options.ContainsKey("force"))
options.Add("force", "");
if (!options.ContainsKey("number-of-retries"))
options["number-of-retries"] = "2";
@@ -741,8 +744,9 @@ namespace Duplicati.GUI
{
string destination = base.GetConfiguration(options);
options.Add("delete-older-than", this.Older);
options.Add("force", "");
options["delete-older-than"] = this.Older;
if (!options.ContainsKey("force"))
options.Add("force", "");
if (!options.ContainsKey("number-of-retries"))
options["number-of-retries"] = "2";
+5 -18
View File
@@ -37,60 +37,47 @@
//
// OKBtn
//
this.OKBtn.Location = new System.Drawing.Point(96, 128);
resources.ApplyResources(this.OKBtn, "OKBtn");
this.OKBtn.Name = "OKBtn";
this.OKBtn.Size = new System.Drawing.Size(75, 23);
this.OKBtn.TabIndex = 4;
this.OKBtn.Text = "OK";
this.OKBtn.UseVisualStyleBackColor = true;
this.OKBtn.Click += new System.EventHandler(this.OKBtn_Click);
//
// CancelBtn
//
this.CancelBtn.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.CancelBtn.Location = new System.Drawing.Point(184, 128);
resources.ApplyResources(this.CancelBtn, "CancelBtn");
this.CancelBtn.Name = "CancelBtn";
this.CancelBtn.Size = new System.Drawing.Size(75, 23);
this.CancelBtn.TabIndex = 5;
this.CancelBtn.Text = "Cancel";
this.CancelBtn.UseVisualStyleBackColor = true;
this.CancelBtn.Click += new System.EventHandler(this.CancelBtn_Click);
//
// ThreadPriorityPicker
//
this.ThreadPriorityPicker.Location = new System.Drawing.Point(16, 16);
resources.ApplyResources(this.ThreadPriorityPicker, "ThreadPriorityPicker");
this.ThreadPriorityPicker.Name = "ThreadPriorityPicker";
this.ThreadPriorityPicker.Size = new System.Drawing.Size(322, 23);
this.ThreadPriorityPicker.TabIndex = 6;
//
// BandwidthLimit
//
this.BandwidthLimit.DownloadLimit = null;
this.BandwidthLimit.DownloadLimitInBytes = ((long)(0));
this.BandwidthLimit.Location = new System.Drawing.Point(16, 48);
resources.ApplyResources(this.BandwidthLimit, "BandwidthLimit");
this.BandwidthLimit.Name = "BandwidthLimit";
this.BandwidthLimit.Size = new System.Drawing.Size(321, 54);
this.BandwidthLimit.TabIndex = 7;
this.BandwidthLimit.UploadLimit = null;
this.BandwidthLimit.UploadLimitInBytes = ((long)(0));
//
// ThrottleControl
//
this.AcceptButton = this.OKBtn;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.CancelBtn;
this.ClientSize = new System.Drawing.Size(352, 166);
this.Controls.Add(this.BandwidthLimit);
this.Controls.Add(this.ThreadPriorityPicker);
this.Controls.Add(this.CancelBtn);
this.Controls.Add(this.OKBtn);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ThrottleControl";
this.Text = "Throttle control";
this.Load += new System.EventHandler(this.ThrottleControl_Load);
this.ResumeLayout(false);
+109
View File
@@ -118,6 +118,106 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="OKBtn.Location" type="System.Drawing.Point, System.Drawing">
<value>96, 128</value>
</data>
<data name="OKBtn.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="OKBtn.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="OKBtn.Text" xml:space="preserve">
<value>OK</value>
</data>
<data name="&gt;&gt;OKBtn.Name" xml:space="preserve">
<value>OKBtn</value>
</data>
<data name="&gt;&gt;OKBtn.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;OKBtn.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;OKBtn.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="CancelBtn.Location" type="System.Drawing.Point, System.Drawing">
<value>184, 128</value>
</data>
<data name="CancelBtn.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="CancelBtn.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="CancelBtn.Text" xml:space="preserve">
<value>Cancel</value>
</data>
<data name="&gt;&gt;CancelBtn.Name" xml:space="preserve">
<value>CancelBtn</value>
</data>
<data name="&gt;&gt;CancelBtn.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;CancelBtn.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;CancelBtn.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="ThreadPriorityPicker.Location" type="System.Drawing.Point, System.Drawing">
<value>16, 16</value>
</data>
<data name="ThreadPriorityPicker.Size" type="System.Drawing.Size, System.Drawing">
<value>322, 23</value>
</data>
<data name="ThreadPriorityPicker.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="&gt;&gt;ThreadPriorityPicker.Name" xml:space="preserve">
<value>ThreadPriorityPicker</value>
</data>
<data name="&gt;&gt;ThreadPriorityPicker.Type" xml:space="preserve">
<value>Duplicati.GUI.HelperControls.ThreadPriorityPicker, Duplicati, Version=1.3.2.1415, Culture=neutral, PublicKeyToken=8bfe994a39631a7b</value>
</data>
<data name="&gt;&gt;ThreadPriorityPicker.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;ThreadPriorityPicker.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="BandwidthLimit.Location" type="System.Drawing.Point, System.Drawing">
<value>16, 48</value>
</data>
<data name="BandwidthLimit.Size" type="System.Drawing.Size, System.Drawing">
<value>321, 54</value>
</data>
<data name="BandwidthLimit.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="&gt;&gt;BandwidthLimit.Name" xml:space="preserve">
<value>BandwidthLimit</value>
</data>
<data name="&gt;&gt;BandwidthLimit.Type" xml:space="preserve">
<value>Duplicati.GUI.HelperControls.BandwidthLimit, Duplicati, Version=1.3.2.1415, Culture=neutral, PublicKeyToken=8bfe994a39631a7b</value>
</data>
<data name="&gt;&gt;BandwidthLimit.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;BandwidthLimit.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 13</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>352, 166</value>
</data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAoAMDAQAAEABABoBgAApgAAACAgEAABAAQA6AIAAA4HAAAQEBAAAQAEACgBAAD2CQAAMDAAAAEA
@@ -825,4 +925,13 @@
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAEAAA==
</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Throttle control</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>ThrottleControl</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>
@@ -125,24 +125,28 @@ namespace Duplicati.GUI.Wizard_pages.Add_backup
private void EnableFullBackupClean_CheckedChanged(object sender, EventArgs e)
{
CleanFullBackupCount.Enabled = EnableFullBackupClean.Checked;
m_wrapper.CleanupSettingsUI.HasWarnedClean = false;
ResetUserHasBeenWarned();
}
private void EnableCleanupDuration_CheckedChanged(object sender, EventArgs e)
{
CleanupDuration.Enabled = EnableCleanupDuration.Checked;
m_wrapper.CleanupSettingsUI.HasWarnedClean = false;
ResetUserHasBeenWarned();
}
private void CleanFullBackupCount_ValueChanged(object sender, EventArgs e)
{
m_wrapper.CleanupSettingsUI.HasWarnedClean = false;
ResetUserHasBeenWarned();
}
private void CleanupDuration_ValueChanged(object sender, EventArgs e)
{
m_wrapper.CleanupSettingsUI.HasWarnedClean = false;
ResetUserHasBeenWarned();
}
private void ResetUserHasBeenWarned()
{
if (m_wrapper != null) m_wrapper.CleanupSettingsUI.HasWarnedClean = false;
}
}
}
+46 -11
View File
@@ -22,23 +22,24 @@ namespace Duplicati.GUI.Wizard_pages.Add_backup
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FinishedAdd));
this.label1 = new System.Windows.Forms.Label();
this.Summary = new System.Windows.Forms.TextBox();
this.RunNow = new System.Windows.Forms.CheckBox();
this.Tabs = new System.Windows.Forms.TabControl();
this.TabSummary = new System.Windows.Forms.TabPage();
this.TabCommandLine = new System.Windows.Forms.TabPage();
this.CommandLine = new System.Windows.Forms.TextBox();
this.Tabs.SuspendLayout();
this.TabSummary.SuspendLayout();
this.TabCommandLine.SuspendLayout();
this.SuspendLayout();
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// Summary
//
resources.ApplyResources(this.Summary, "Summary");
@@ -51,14 +52,45 @@ namespace Duplicati.GUI.Wizard_pages.Add_backup
this.RunNow.Name = "RunNow";
this.RunNow.UseVisualStyleBackColor = true;
//
// Tabs
//
this.Tabs.Controls.Add(this.TabSummary);
this.Tabs.Controls.Add(this.TabCommandLine);
resources.ApplyResources(this.Tabs, "Tabs");
this.Tabs.Name = "Tabs";
this.Tabs.SelectedIndex = 0;
this.Tabs.SelectedIndexChanged += new System.EventHandler(this.Tabs_SelectedIndexChanged);
//
// TabSummary
//
this.TabSummary.Controls.Add(this.Summary);
resources.ApplyResources(this.TabSummary, "TabSummary");
this.TabSummary.Name = "TabSummary";
//
// TabCommandLine
//
this.TabCommandLine.Controls.Add(this.CommandLine);
resources.ApplyResources(this.TabCommandLine, "TabCommandLine");
this.TabCommandLine.Name = "TabCommandLine";
//
// CommandLine
//
resources.ApplyResources(this.CommandLine, "CommandLine");
this.CommandLine.Name = "CommandLine";
this.CommandLine.ReadOnly = true;
//
// FinishedAdd
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.Tabs);
this.Controls.Add(this.RunNow);
this.Controls.Add(this.Summary);
this.Controls.Add(this.label1);
this.Name = "FinishedAdd";
this.Tabs.ResumeLayout(false);
this.TabSummary.ResumeLayout(false);
this.TabSummary.PerformLayout();
this.TabCommandLine.ResumeLayout(false);
this.TabCommandLine.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
@@ -66,8 +98,11 @@ namespace Duplicati.GUI.Wizard_pages.Add_backup
#endregion
private System.Windows.Forms.Label label1;
public System.Windows.Forms.TextBox Summary;
public System.Windows.Forms.CheckBox RunNow;
private System.Windows.Forms.TabControl Tabs;
private System.Windows.Forms.TabPage TabSummary;
private System.Windows.Forms.TabPage TabCommandLine;
public System.Windows.Forms.TextBox CommandLine;
}
}
@@ -115,6 +115,9 @@ namespace Duplicati.GUI.Wizard_pages.Add_backup
Summary.Text = sb.ToString();
args.TreatAsLast = true;
CommandLine.Text = "";
Tabs.SelectedTab = TabSummary;
}
public override string HelpText
@@ -138,5 +141,170 @@ namespace Duplicati.GUI.Wizard_pages.Add_backup
return Strings.FinishedAdd.PageTitleModify;
}
}
private string QuoteIfRequired(string input)
{
if (Library.Utility.Utility.IsClientLinux)
{
input = input.Replace("\\", "\\\\")
.Replace("$", "\\$")
.Replace("*", "\\*")
.Replace("?", "\\?")
.Replace("`", "\\`");
}
if (input.IndexOfAny(new char[] { ' ', '|', '&' }) >= 0)
{
if (!Library.Utility.Utility.IsClientLinux && input.EndsWith("\\"))
input += "\\";
return '"' + input + '"';
}
return input;
}
private void Tabs_SelectedIndexChanged(object sender, EventArgs e)
{
// The CommandLine box is filled only on demand.
if (Tabs.SelectedTab == TabCommandLine && CommandLine.TextLength == 0)
{
// Getting all options for the task
System.Data.LightDatamodel.IDataFetcherWithRelations con = new System.Data.LightDatamodel.DataFetcherNested(Program.DataConnection);
Schedule schedule = con.Add<Schedule>();
m_wrapper.UpdateSchedule(schedule);
Dictionary<string, string> options = new Dictionary<string, string>();
String target = new IncrementalBackupTask(schedule).GetConfiguration(options);
List<Library.Interface.ICommandLineArgument> defaults = SettingOverrides.GetModuleOptions(m_wrapper, null);
defaults.AddRange(new Library.Main.Options(new Dictionary<string, string>()).SupportedCommands);
String source = schedule.Task.SourcePath;
if (source == "")
{
// We need to extract the paths of the "easy" folders
string[] sourceFolders = DynamicSetupHelper.GetSourceFolders(schedule.Task, new ApplicationSettings(schedule.Task.DataParent), new List<KeyValuePair<bool, string>>());
source = String.Join(System.IO.Path.PathSeparator.ToString(), sourceFolders);
}
// We have everything needed to build the Command line
System.Text.StringBuilder sb = new StringBuilder();
sb.AppendLine("Command-line equivalent of this task:");
sb.AppendLine();
sb.Append(QuoteIfRequired(Application.ExecutablePath.Substring(0, Application.ExecutablePath.Length - 4) + ".CommandLine.exe"));
sb.Append(" backup");
// Filters are handled differently
options.Remove("filter");
//Remove all default values, and mask passwords
foreach (Library.Interface.ICommandLineArgument arg in defaults)
{
string defvalue = arg.DefaultValue == null ? "" : arg.DefaultValue;
List<string> names = new List<string>();
names.Add(arg.Name);
if (arg.Aliases != null)
names.AddRange(arg.Aliases);
foreach(string a in names)
{
if (options.ContainsKey(a))
switch(arg.Type)
{
case Library.Interface.CommandLineArgument.ArgumentType.Password:
if (!string.IsNullOrEmpty(options[a]))
options[a] = "**********";
break;
case Library.Interface.CommandLineArgument.ArgumentType.Enumeration:
case Library.Interface.CommandLineArgument.ArgumentType.Size:
if (string.Equals(defvalue, options[a] == null ? "" : options[a], StringComparison.InvariantCultureIgnoreCase))
options.Remove(a);
break;
case Library.Interface.CommandLineArgument.ArgumentType.Path:
if (string.Equals(defvalue, options[a] == null ? "" : options[a], Library.Utility.Utility.ClientFilenameStringComparision))
options.Remove(a);
break;
case Library.Interface.CommandLineArgument.ArgumentType.Boolean:
bool parsed = Library.Utility.Utility.ParseBoolOption(options, a);
bool defbool = Library.Utility.Utility.ParseBool(defvalue, false);
if (parsed == defbool)
options.Remove(a);
break;
default:
if (string.Equals(defvalue, options[a] == null ? "" : options[a]))
options.Remove(a);
break;
}
}
}
foreach (KeyValuePair<string, string> i in options)
{
sb.Append(" --" + i.Key);
if (!string.IsNullOrEmpty(i.Value))
sb.Append("=" + QuoteIfRequired(i.Value));
}
// Filters
foreach (Datamodel.TaskFilter filter in schedule.Task.SortedFilters)
{
sb.Append(" --");
sb.Append(filter.Include ? "include" : "exclude");
sb.Append(filter.GlobbingFilter.Length == 0 ? "-regexp" : "");
sb.Append("=");
sb.Append(QuoteIfRequired(filter.GlobbingFilter.Length > 0 ? filter.GlobbingFilter : filter.Filter));
}
// Source and target
sb.Append(" " + QuoteIfRequired(source));
sb.Append(" " + QuoteIfRequired(target));
// Cleanup commands do not need encryption passphrase
options.Remove("passphrase");
if (!string.IsNullOrEmpty(m_wrapper.BackupExpireInterval))
{
sb.AppendLine();
sb.AppendLine();
sb.Append(QuoteIfRequired(Application.ExecutablePath.Substring(0, Application.ExecutablePath.Length - 4) + ".CommandLine.exe"));
sb.Append(" delete-older-than ");
sb.Append(QuoteIfRequired(m_wrapper.BackupExpireInterval));
foreach (KeyValuePair<string, string> i in options)
{
sb.Append(" --" + i.Key);
if (!string.IsNullOrEmpty(i.Value))
sb.Append("=" + QuoteIfRequired(i.Value));
}
sb.Append(" " + QuoteIfRequired(target));
}
if (m_wrapper.MaxFullBackups > 0)
{
sb.AppendLine();
sb.AppendLine();
sb.Append(QuoteIfRequired(Application.ExecutablePath.Substring(0, Application.ExecutablePath.Length - 4) + ".CommandLine.exe"));
sb.Append(" delete-all-but-n");
sb.Append(" " + QuoteIfRequired(m_wrapper.MaxFullBackups.ToString()));
foreach (KeyValuePair<string, string> i in options)
{
sb.Append(" --" + i.Key);
if (!string.IsNullOrEmpty(i.Value))
sb.Append("=" + QuoteIfRequired(i.Value));
}
sb.Append(" " + QuoteIfRequired(target));
}
CommandLine.Text = sb.ToString();
}
}
}
}
@@ -112,55 +112,31 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>24, 16</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>50, 13</value>
</data>
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Summary</value>
</data>
<data name="&gt;&gt;label1.Name" xml:space="preserve">
<value>label1</value>
</data>
<data name="&gt;&gt;label1.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>2</value>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="Summary.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="Summary.Font" type="System.Drawing.Font, System.Drawing">
<value>Courier New, 8.25pt</value>
</data>
<data name="Summary.Location" type="System.Drawing.Point, System.Drawing">
<value>24, 40</value>
<value>3, 3</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="Summary.Multiline" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="Summary.ScrollBars" type="System.Windows.Forms.ScrollBars, System.Windows.Forms">
<value>Both</value>
</data>
<data name="Summary.Size" type="System.Drawing.Size, System.Drawing">
<value>456, 152</value>
<value>450, 146</value>
</data>
<data name="Summary.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
@@ -169,13 +145,13 @@
<value>Summary</value>
</data>
<data name="&gt;&gt;Summary.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;Summary.Parent" xml:space="preserve">
<value>$this</value>
<value>TabSummary</value>
</data>
<data name="&gt;&gt;Summary.ZOrder" xml:space="preserve">
<value>1</value>
<value>0</value>
</data>
<data name="RunNow.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -196,15 +172,123 @@
<value>RunNow</value>
</data>
<data name="&gt;&gt;RunNow.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;RunNow.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;RunNow.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="TabSummary.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
</data>
<data name="TabSummary.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="TabSummary.Size" type="System.Drawing.Size, System.Drawing">
<value>456, 152</value>
</data>
<data name="TabSummary.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<data name="TabSummary.Text" xml:space="preserve">
<value>Summary</value>
</data>
<data name="&gt;&gt;TabSummary.Name" xml:space="preserve">
<value>TabSummary</value>
</data>
<data name="&gt;&gt;TabSummary.Type" xml:space="preserve">
<value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;TabSummary.Parent" xml:space="preserve">
<value>Tabs</value>
</data>
<data name="&gt;&gt;TabSummary.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="CommandLine.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="CommandLine.Font" type="System.Drawing.Font, System.Drawing">
<value>Courier New, 8.25pt</value>
</data>
<data name="CommandLine.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 3</value>
</data>
<data name="CommandLine.Multiline" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="CommandLine.ScrollBars" type="System.Windows.Forms.ScrollBars, System.Windows.Forms">
<value>Both</value>
</data>
<data name="CommandLine.Size" type="System.Drawing.Size, System.Drawing">
<value>450, 146</value>
</data>
<data name="CommandLine.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;CommandLine.Name" xml:space="preserve">
<value>CommandLine</value>
</data>
<data name="&gt;&gt;CommandLine.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;CommandLine.Parent" xml:space="preserve">
<value>TabCommandLine</value>
</data>
<data name="&gt;&gt;CommandLine.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="TabCommandLine.Location" type="System.Drawing.Point, System.Drawing">
<value>4, 22</value>
</data>
<data name="TabCommandLine.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="TabCommandLine.Size" type="System.Drawing.Size, System.Drawing">
<value>456, 152</value>
</data>
<data name="TabCommandLine.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="TabCommandLine.Text" xml:space="preserve">
<value>Command Line</value>
</data>
<data name="&gt;&gt;TabCommandLine.Name" xml:space="preserve">
<value>TabCommandLine</value>
</data>
<data name="&gt;&gt;TabCommandLine.Type" xml:space="preserve">
<value>System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;TabCommandLine.Parent" xml:space="preserve">
<value>Tabs</value>
</data>
<data name="&gt;&gt;TabCommandLine.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="Tabs.Location" type="System.Drawing.Point, System.Drawing">
<value>21, 16</value>
</data>
<data name="Tabs.Size" type="System.Drawing.Size, System.Drawing">
<value>464, 178</value>
</data>
<data name="Tabs.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;Tabs.Name" xml:space="preserve">
<value>Tabs</value>
</data>
<data name="&gt;&gt;Tabs.Type" xml:space="preserve">
<value>System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;Tabs.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;Tabs.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
@@ -64,6 +64,55 @@ namespace Duplicati.GUI.Wizard_pages.Add_backup
}
}
public static List<Library.Interface.ICommandLineArgument> GetModuleOptions(WizardSettingsWrapper wrapper, Control parent)
{
List<Library.Interface.ICommandLineArgument> res = new List<Library.Interface.ICommandLineArgument>();
try
{
res.AddRange(Library.DynamicLoader.BackendLoader.GetSupportedCommands(wrapper.Backend));
}
catch (Exception ex)
{
if (parent != null)
MessageBox.Show(parent, string.Format(Strings.SettingOverrides.BackendLoadError, ex), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
try
{
res.AddRange(Library.DynamicLoader.EncryptionLoader.GetSupportedCommands(wrapper.EncryptionModule));
}
catch (Exception ex)
{
if (parent != null)
MessageBox.Show(parent, string.Format(Strings.SettingOverrides.EncryptionLoadError, ex), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
try
{
res.AddRange(Library.DynamicLoader.CompressionLoader.GetSupportedCommands(wrapper.CompressionModule));
}
catch (Exception ex)
{
if (parent != null)
MessageBox.Show(parent, string.Format(Strings.SettingOverrides.CompressionLoadError, ex), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
try
{
foreach (Library.Interface.IGenericModule m in Library.DynamicLoader.GenericLoader.Modules)
if (m.SupportedCommands != null)
res.AddRange(m.SupportedCommands);
}
catch (Exception ex)
{
if (parent != null)
MessageBox.Show(parent, string.Format(Strings.SettingOverrides.GenericModuleLoadError, ex), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
return res;
}
void SettingOverrides_PageEnter(object sender, System.Windows.Forms.Wizard.PageChangedArgs args)
{
if (!OptionGrid.Unsupported)
@@ -73,46 +122,7 @@ namespace Duplicati.GUI.Wizard_pages.Add_backup
if (!m_settings.ContainsKey("Overrides:Table"))
{
IList<Library.Interface.ICommandLineArgument> primary = new Library.Main.Options(new Dictionary<string, string>()).SupportedCommands;
List<Library.Interface.ICommandLineArgument> secondary = new List<Library.Interface.ICommandLineArgument>();
try
{
secondary.AddRange(Library.DynamicLoader.BackendLoader.GetSupportedCommands(m_wrapper.Backend));
}
catch (Exception ex)
{
MessageBox.Show(this, string.Format(Strings.SettingOverrides.BackendLoadError, ex), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
try
{
secondary.AddRange(Library.DynamicLoader.EncryptionLoader.GetSupportedCommands(m_wrapper.EncryptionModule));
}
catch (Exception ex)
{
MessageBox.Show(this, string.Format(Strings.SettingOverrides.EncryptionLoadError, ex), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
try
{
secondary.AddRange(Library.DynamicLoader.CompressionLoader.GetSupportedCommands(m_wrapper.CompressionModule));
}
catch (Exception ex)
{
MessageBox.Show(this, string.Format(Strings.SettingOverrides.CompressionLoadError, ex), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
try
{
foreach(Library.Interface.IGenericModule m in Library.DynamicLoader.GenericLoader.Modules)
if (m.SupportedCommands != null)
secondary.AddRange(m.SupportedCommands);
}
catch (Exception ex)
{
MessageBox.Show(this, string.Format(Strings.SettingOverrides.GenericModuleLoadError, ex), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
IList<Library.Interface.ICommandLineArgument> secondary = GetModuleOptions(m_wrapper, this);
OptionGrid.Setup(primary, secondary, m_wrapper.Overrides);
+1 -1
View File
@@ -140,7 +140,7 @@ namespace Duplicati.GUI.Wizard_pages
private void donate_clicked(object sender, EventArgs e)
{
Duplicati.Library.Utility.UrlUtillity.OpenUrl("https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=paypal%40hexad%2edk&item_name=Duplicati%20Donation&no_shipping=2&no_note=1&tax=0&currency_code=EUR&bn=PP%2dDonationsBF&charset=UTF%2d8");
Duplicati.Library.Utility.UrlUtillity.OpenUrl("https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=paypal%40hexad%2edk&item_name=Duplicati%20Donation&no_shipping=2&no_note=1&tax=0&currency_code=EUR&bn=PP%2dDonationsBF&charset=UTF%2d8&lc=US");
}
private void donate_link_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
@@ -175,17 +175,35 @@ namespace Duplicati.GUI.Wizard_pages.RestoreSetup
else
throw new Exception(Strings.FinishedRestoreSetup.SetupFileMissingError);
//Make sure we have a startup delay, so a restart won't accidently wipe something
Datamodel.ApplicationSettings appset = new Datamodel.ApplicationSettings(Program.DataConnection);
if (string.IsNullOrEmpty(appset.StartupDelayDuration) || Duplicati.Library.Utility.Timeparser.ParseTimeSpan(appset.StartupDelayDuration) < TimeSpan.FromMinutes(5))
{
appset.StartupDelayDuration = "5m";
Program.DataConnection.CommitRecursive(Program.DataConnection.GetObjects<Datamodel.ApplicationSetting>());
}
NormalizeApplicationSettings();
Program.Scheduler.Reschedule();
}
}
private void NormalizeApplicationSettings() {
//Make sure we have a startup delay, so a restart won't accidently wipe something
bool settingsModified = false;
Datamodel.ApplicationSettings appset = new Datamodel.ApplicationSettings(Program.DataConnection);
if (string.IsNullOrEmpty(appset.StartupDelayDuration) || Duplicati.Library.Utility.Timeparser.ParseTimeSpan(appset.StartupDelayDuration) < TimeSpan.FromMinutes(5))
{
appset.StartupDelayDuration = "5m";
settingsModified = true;
}
if (!System.IO.Directory.Exists(appset.TempPath)) {
appset.TempPath = "";
settingsModified = true;
}
if (!System.IO.Directory.Exists(appset.SignatureCachePath)) {
appset.SignatureCachePath = "";
settingsModified = true;
}
if (settingsModified) {
Program.DataConnection.CommitRecursive(Program.DataConnection.GetObjects<Datamodel.ApplicationSetting>());
}
}
}
}
@@ -139,9 +139,22 @@ namespace Duplicati.Library.Backend
System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
HttpWebRequest req = CreateRequest("", extraUrl + markerUrl);
using (HttpWebResponse resp = (HttpWebResponse)req.GetResponse())
using (System.IO.Stream s = resp.GetResponseStream())
doc.Load(s);
try
{
using (HttpWebResponse resp = (HttpWebResponse)req.GetResponse())
using (System.IO.Stream s = resp.GetResponseStream())
doc.Load(s);
}
catch (WebException wex)
{
if (markerUrl == "") //Only check on first itteration
if (wex.Response is HttpWebResponse && ((HttpWebResponse)wex.Response).StatusCode == HttpStatusCode.NotFound)
throw new FolderMissingException(wex);
//Other error, just re-throw
throw;
}
System.Xml.XmlNodeList lst = doc.SelectNodes("container/object");
@@ -209,10 +222,10 @@ namespace Duplicati.Library.Backend
get
{
return new List<ICommandLineArgument>(new ICommandLineArgument[] {
new CommandLineArgument("ftp-password", CommandLineArgument.ArgumentType.String, Strings.CloudFiles.DescriptionFTPPasswordShort, Strings.CloudFiles.DescriptionFTPPasswordLong),
new CommandLineArgument("ftp-password", CommandLineArgument.ArgumentType.Password, Strings.CloudFiles.DescriptionFTPPasswordShort, Strings.CloudFiles.DescriptionFTPPasswordLong),
new CommandLineArgument("ftp-username", CommandLineArgument.ArgumentType.String, Strings.CloudFiles.DescriptionFTPUsernameShort, Strings.CloudFiles.DescriptionFTPUsernameLong),
new CommandLineArgument("cloudfiles-username", CommandLineArgument.ArgumentType.String, Strings.CloudFiles.DescriptionUsernameShort, Strings.CloudFiles.DescriptionUsernameLong),
new CommandLineArgument("cloudfiles-accesskey", CommandLineArgument.ArgumentType.String, Strings.CloudFiles.DescriptionPasswordShort, Strings.CloudFiles.DescriptionPasswordLong),
new CommandLineArgument("cloudfiles-accesskey", CommandLineArgument.ArgumentType.Password, Strings.CloudFiles.DescriptionPasswordShort, Strings.CloudFiles.DescriptionPasswordLong),
new CommandLineArgument("cloudfiles-uk-account", CommandLineArgument.ArgumentType.Boolean, Strings.CloudFiles.DescriptionUKAccountShort, string.Format(Strings.CloudFiles.DescriptionUKAccountLong, "cloudfiles-authentication-url", AUTH_URL_UK)),
new CommandLineArgument("cloudfiles-authentication-url", CommandLineArgument.ArgumentType.String, Strings.CloudFiles.DescriptionAuthenticationURLShort, string.Format(Strings.CloudFiles.DescriptionAuthenticationURLLong_v2, "cloudfiles-uk-account"), AUTH_URL_US),
});
@@ -340,11 +353,24 @@ namespace Duplicati.Library.Backend
req.Timeout = 100000;
//We need to verify the eTag locally
using (HttpWebResponse resp = (HttpWebResponse)req.GetResponse())
if ((int)resp.StatusCode >= 300)
throw new WebException(Strings.CloudFiles.FileUploadError, null, WebExceptionStatus.ProtocolError, resp);
else
md5Hash = resp.Headers["ETag"];
try
{
using (HttpWebResponse resp = (HttpWebResponse)req.GetResponse())
if ((int)resp.StatusCode >= 300)
throw new WebException(Strings.CloudFiles.FileUploadError, null, WebExceptionStatus.ProtocolError, resp);
else
md5Hash = resp.Headers["ETag"];
}
catch (WebException wex)
{
//Catch 404 and turn it into a FolderNotFound error
if (wex.Response is HttpWebResponse && ((HttpWebResponse)wex.Response).StatusCode == HttpStatusCode.NotFound)
throw new FolderMissingException(wex);
//Other error, just re-throw
throw;
}
if (md5Hash == null || md5Hash.ToLower() != fileHash.ToLower())
{
+49 -12
View File
@@ -28,11 +28,12 @@ namespace Duplicati.Library.Backend
public class FTP : IBackend_v2, IStreamingBackend, IBackendGUI
{
private System.Net.NetworkCredential m_userInfo;
private string m_url;
private readonly string m_url;
private bool m_useSSL = false;
private bool m_defaultPassive = true;
private bool m_passive = false;
private readonly bool m_useSSL = false;
private readonly bool m_defaultPassive = true;
private readonly bool m_passive = false;
private readonly bool m_listVerify = true;
public FTP()
{
@@ -85,9 +86,7 @@ namespace Duplicati.Library.Backend
m_useSSL = Utility.Utility.ParseBoolOption(options, "use-ssl");
//HACK: We modify the commandline options to alter the setting it the ftp backend is loaded
if (!options.ContainsKey("list-verify-uploads"))
options.Add("list-verify-uploads", "true");
m_listVerify = !Utility.Utility.ParseBoolOption(options, "disable-upload-verify");
if (Utility.Utility.ParseBoolOption(options, "ftp-passive"))
{
@@ -171,7 +170,12 @@ namespace Duplicati.Library.Backend
public List<IFileEntry> List()
{
System.Net.FtpWebRequest req = CreateRequest("");
return List("");
}
public List<IFileEntry> List(string filename)
{
System.Net.FtpWebRequest req = CreateRequest(filename);
req.Method = System.Net.WebRequestMethods.Ftp.ListDirectoryDetails;
req.UseBinary = false;
@@ -209,9 +213,32 @@ namespace Duplicati.Library.Backend
req = CreateRequest(remotename);
req.Method = System.Net.WebRequestMethods.Ftp.UploadFile;
req.UseBinary = true;
long streamLen = -1;
try { streamLen = input.Length; }
catch {}
using (System.IO.Stream rs = req.GetRequestStream())
Utility.Utility.CopyStream(input, rs, true);
if (m_listVerify)
{
List<IFileEntry> files = List(remotename);
StringBuilder sb = new StringBuilder();
foreach(IFileEntry fe in files)
if (fe.Name.Equals(remotename) || fe.Name.EndsWith("/" + remotename) || fe.Name.EndsWith("\\" + remotename))
{
if (fe.Size < 0 || streamLen < 0 || fe.Size == streamLen)
return;
throw new Exception(string.Format(Strings.FTPBackend.ListVerifySizeFailure, remotename, fe.Size, streamLen));
}
else
sb.AppendLine(fe.Name);
throw new Exception(string.Format(Strings.FTPBackend.ListVerifyFailure, remotename, sb.ToString()));
}
}
catch (System.Net.WebException wex)
{
@@ -260,9 +287,10 @@ namespace Duplicati.Library.Backend
return new List<ICommandLineArgument>(new ICommandLineArgument[] {
new CommandLineArgument("ftp-passive", CommandLineArgument.ArgumentType.Boolean, Strings.FTPBackend.DescriptionFTPPassiveShort, Strings.FTPBackend.DescriptionFTPPassiveLong, "false"),
new CommandLineArgument("ftp-regular", CommandLineArgument.ArgumentType.Boolean, Strings.FTPBackend.DescriptionFTPActiveShort, Strings.FTPBackend.DescriptionFTPActiveLong, "true"),
new CommandLineArgument("ftp-password", CommandLineArgument.ArgumentType.String, Strings.FTPBackend.DescriptionFTPPasswordShort, Strings.FTPBackend.DescriptionFTPPasswordLong),
new CommandLineArgument("ftp-password", CommandLineArgument.ArgumentType.Password, Strings.FTPBackend.DescriptionFTPPasswordShort, Strings.FTPBackend.DescriptionFTPPasswordLong),
new CommandLineArgument("ftp-username", CommandLineArgument.ArgumentType.String, Strings.FTPBackend.DescriptionFTPUsernameShort, Strings.FTPBackend.DescriptionFTPUsernameLong),
new CommandLineArgument("use-ssl", CommandLineArgument.ArgumentType.Boolean, Strings.FTPBackend.DescriptionUseSSLShort, Strings.FTPBackend.DescriptionUseSSLLong),
new CommandLineArgument("disable-upload-verify", CommandLineArgument.ArgumentType.Boolean, Strings.FTPBackend.DescriptionDisableUploadVerifyShort, Strings.FTPBackend.DescriptionDisableUploadVerifyLong),
});
}
}
@@ -286,10 +314,19 @@ namespace Duplicati.Library.Backend
}
#endregion
private System.Net.FtpWebRequest CreateRequest(string remotename)
{
System.Net.FtpWebRequest req = (System.Net.FtpWebRequest)System.Net.FtpWebRequest.Create(m_url + remotename);
return CreateRequest(remotename, false);
}
private System.Net.FtpWebRequest CreateRequest(string remotename, bool createFolder)
{
string url = m_url;
if (createFolder && url.EndsWith("/"))
url = url.Substring(0, url.Length - 1);
System.Net.FtpWebRequest req = (System.Net.FtpWebRequest)System.Net.FtpWebRequest.Create(url + remotename);
if (m_userInfo != null)
req.Credentials = m_userInfo;
@@ -317,7 +354,7 @@ namespace Duplicati.Library.Backend
public void CreateFolder()
{
System.Net.FtpWebRequest req = CreateRequest("");
System.Net.FtpWebRequest req = CreateRequest("", true);
req.Method = System.Net.WebRequestMethods.Ftp.MakeDirectory;
req.KeepAlive = false;
using (req.GetResponse())
+237 -229
View File
@@ -1,229 +1,237 @@
namespace Duplicati.Library.Backend
{
partial class FTPUI
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FTPUI));
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.Servername = new System.Windows.Forms.TextBox();
this.Path = new System.Windows.Forms.TextBox();
this.Username = new System.Windows.Forms.TextBox();
this.Password = new Duplicati.Winforms.Controls.PasswordControl();
this.Port = new System.Windows.Forms.NumericUpDown();
this.TestConnection = new System.Windows.Forms.Button();
this.PassiveConnection = new System.Windows.Forms.CheckBox();
this.CreateFolderButton = new System.Windows.Forms.Button();
this.UseSSL = new System.Windows.Forms.CheckBox();
this.SSLGroup = new System.Windows.Forms.GroupBox();
this.AcceptSpecifiedHash = new System.Windows.Forms.CheckBox();
this.SpecifiedHash = new System.Windows.Forms.TextBox();
this.AcceptAnyHash = new System.Windows.Forms.CheckBox();
((System.ComponentModel.ISupportInitialize)(this.Port)).BeginInit();
this.SSLGroup.SuspendLayout();
this.SuspendLayout();
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// label2
//
resources.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
//
// label3
//
resources.ApplyResources(this.label3, "label3");
this.label3.Name = "label3";
//
// label4
//
resources.ApplyResources(this.label4, "label4");
this.label4.Name = "label4";
//
// label5
//
resources.ApplyResources(this.label5, "label5");
this.label5.Name = "label5";
//
// Servername
//
resources.ApplyResources(this.Servername, "Servername");
this.Servername.Name = "Servername";
this.Servername.TextChanged += new System.EventHandler(this.Servername_TextChanged);
//
// Path
//
resources.ApplyResources(this.Path, "Path");
this.Path.Name = "Path";
this.Path.TextChanged += new System.EventHandler(this.Path_TextChanged);
//
// Username
//
resources.ApplyResources(this.Username, "Username");
this.Username.Name = "Username";
this.Username.TextChanged += new System.EventHandler(this.Username_TextChanged);
//
// Password
//
resources.ApplyResources(this.Password, "Password");
this.Password.Name = "Password";
this.Password.TextChanged += new System.EventHandler(this.Password_TextChanged);
//
// Port
//
resources.ApplyResources(this.Port, "Port");
this.Port.Maximum = new decimal(new int[] {
65500,
0,
0,
0});
this.Port.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.Port.Name = "Port";
this.Port.Value = new decimal(new int[] {
21,
0,
0,
0});
this.Port.ValueChanged += new System.EventHandler(this.Port_ValueChanged);
//
// TestConnection
//
resources.ApplyResources(this.TestConnection, "TestConnection");
this.TestConnection.Name = "TestConnection";
this.TestConnection.UseVisualStyleBackColor = true;
this.TestConnection.Click += new System.EventHandler(this.TestConnection_Click);
//
// PassiveConnection
//
resources.ApplyResources(this.PassiveConnection, "PassiveConnection");
this.PassiveConnection.Name = "PassiveConnection";
this.PassiveConnection.UseVisualStyleBackColor = true;
this.PassiveConnection.CheckedChanged += new System.EventHandler(this.PassiveConnection_CheckedChanged);
//
// CreateFolderButton
//
resources.ApplyResources(this.CreateFolderButton, "CreateFolderButton");
this.CreateFolderButton.Name = "CreateFolderButton";
this.CreateFolderButton.UseVisualStyleBackColor = true;
this.CreateFolderButton.Click += new System.EventHandler(this.CreateFolderButton_Click);
//
// UseSSL
//
resources.ApplyResources(this.UseSSL, "UseSSL");
this.UseSSL.Name = "UseSSL";
this.UseSSL.UseVisualStyleBackColor = true;
this.UseSSL.CheckedChanged += new System.EventHandler(this.UseSSL_CheckedChanged);
//
// SSLGroup
//
this.SSLGroup.Controls.Add(this.AcceptSpecifiedHash);
this.SSLGroup.Controls.Add(this.SpecifiedHash);
this.SSLGroup.Controls.Add(this.AcceptAnyHash);
resources.ApplyResources(this.SSLGroup, "SSLGroup");
this.SSLGroup.Name = "SSLGroup";
this.SSLGroup.TabStop = false;
//
// AcceptSpecifiedHash
//
resources.ApplyResources(this.AcceptSpecifiedHash, "AcceptSpecifiedHash");
this.AcceptSpecifiedHash.Name = "AcceptSpecifiedHash";
this.AcceptSpecifiedHash.UseVisualStyleBackColor = true;
this.AcceptSpecifiedHash.CheckedChanged += new System.EventHandler(this.AcceptSpecifiedHash_CheckedChanged);
//
// SpecifiedHash
//
resources.ApplyResources(this.SpecifiedHash, "SpecifiedHash");
this.SpecifiedHash.Name = "SpecifiedHash";
//
// AcceptAnyHash
//
resources.ApplyResources(this.AcceptAnyHash, "AcceptAnyHash");
this.AcceptAnyHash.Name = "AcceptAnyHash";
this.AcceptAnyHash.UseVisualStyleBackColor = true;
this.AcceptAnyHash.CheckedChanged += new System.EventHandler(this.AcceptAnyHash_CheckedChanged);
//
// FTPUI
//
this.Controls.Add(this.UseSSL);
this.Controls.Add(this.SSLGroup);
this.Controls.Add(this.Username);
this.Controls.Add(this.Password);
this.Controls.Add(this.label4);
this.Controls.Add(this.CreateFolderButton);
this.Controls.Add(this.label3);
this.Controls.Add(this.PassiveConnection);
this.Controls.Add(this.TestConnection);
this.Controls.Add(this.Port);
this.Controls.Add(this.Path);
this.Controls.Add(this.Servername);
this.Controls.Add(this.label5);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Name = "FTPUI";
resources.ApplyResources(this, "$this");
this.Load += new System.EventHandler(this.FTPUI_Load);
((System.ComponentModel.ISupportInitialize)(this.Port)).EndInit();
this.SSLGroup.ResumeLayout(false);
this.SSLGroup.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox Servername;
private System.Windows.Forms.TextBox Path;
private System.Windows.Forms.TextBox Username;
private Duplicati.Winforms.Controls.PasswordControl Password;
private System.Windows.Forms.NumericUpDown Port;
private System.Windows.Forms.Button TestConnection;
private System.Windows.Forms.CheckBox PassiveConnection;
private System.Windows.Forms.Button CreateFolderButton;
private System.Windows.Forms.CheckBox UseSSL;
private System.Windows.Forms.GroupBox SSLGroup;
private System.Windows.Forms.CheckBox AcceptSpecifiedHash;
private System.Windows.Forms.TextBox SpecifiedHash;
private System.Windows.Forms.CheckBox AcceptAnyHash;
}
}
namespace Duplicati.Library.Backend
{
partial class FTPUI
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FTPUI));
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.Servername = new System.Windows.Forms.TextBox();
this.Path = new System.Windows.Forms.TextBox();
this.Username = new System.Windows.Forms.TextBox();
this.Password = new Duplicati.Winforms.Controls.PasswordControl();
this.Port = new System.Windows.Forms.NumericUpDown();
this.TestConnection = new System.Windows.Forms.Button();
this.PassiveConnection = new System.Windows.Forms.CheckBox();
this.CreateFolderButton = new System.Windows.Forms.Button();
this.UseSSL = new System.Windows.Forms.CheckBox();
this.SSLGroup = new System.Windows.Forms.GroupBox();
this.AcceptSpecifiedHash = new System.Windows.Forms.CheckBox();
this.SpecifiedHash = new System.Windows.Forms.TextBox();
this.AcceptAnyHash = new System.Windows.Forms.CheckBox();
this.label6 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.Port)).BeginInit();
this.SSLGroup.SuspendLayout();
this.SuspendLayout();
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// label2
//
resources.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
//
// label3
//
resources.ApplyResources(this.label3, "label3");
this.label3.Name = "label3";
//
// label4
//
resources.ApplyResources(this.label4, "label4");
this.label4.Name = "label4";
//
// label5
//
resources.ApplyResources(this.label5, "label5");
this.label5.Name = "label5";
//
// Servername
//
resources.ApplyResources(this.Servername, "Servername");
this.Servername.Name = "Servername";
this.Servername.TextChanged += new System.EventHandler(this.Servername_TextChanged);
//
// Path
//
resources.ApplyResources(this.Path, "Path");
this.Path.Name = "Path";
this.Path.TextChanged += new System.EventHandler(this.Path_TextChanged);
//
// Username
//
resources.ApplyResources(this.Username, "Username");
this.Username.Name = "Username";
this.Username.TextChanged += new System.EventHandler(this.Username_TextChanged);
//
// Password
//
resources.ApplyResources(this.Password, "Password");
this.Password.Name = "Password";
this.Password.TextChanged += new System.EventHandler(this.Password_TextChanged);
//
// Port
//
resources.ApplyResources(this.Port, "Port");
this.Port.Maximum = new decimal(new int[] {
65535,
0,
0,
0});
this.Port.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.Port.Name = "Port";
this.Port.Value = new decimal(new int[] {
21,
0,
0,
0});
this.Port.ValueChanged += new System.EventHandler(this.Port_ValueChanged);
//
// TestConnection
//
resources.ApplyResources(this.TestConnection, "TestConnection");
this.TestConnection.Name = "TestConnection";
this.TestConnection.UseVisualStyleBackColor = true;
this.TestConnection.Click += new System.EventHandler(this.TestConnection_Click);
//
// PassiveConnection
//
resources.ApplyResources(this.PassiveConnection, "PassiveConnection");
this.PassiveConnection.Name = "PassiveConnection";
this.PassiveConnection.UseVisualStyleBackColor = true;
this.PassiveConnection.CheckedChanged += new System.EventHandler(this.PassiveConnection_CheckedChanged);
//
// CreateFolderButton
//
resources.ApplyResources(this.CreateFolderButton, "CreateFolderButton");
this.CreateFolderButton.Name = "CreateFolderButton";
this.CreateFolderButton.UseVisualStyleBackColor = true;
this.CreateFolderButton.Click += new System.EventHandler(this.CreateFolderButton_Click);
//
// UseSSL
//
resources.ApplyResources(this.UseSSL, "UseSSL");
this.UseSSL.Name = "UseSSL";
this.UseSSL.UseVisualStyleBackColor = true;
this.UseSSL.CheckedChanged += new System.EventHandler(this.UseSSL_CheckedChanged);
//
// SSLGroup
//
this.SSLGroup.Controls.Add(this.AcceptSpecifiedHash);
this.SSLGroup.Controls.Add(this.SpecifiedHash);
this.SSLGroup.Controls.Add(this.AcceptAnyHash);
resources.ApplyResources(this.SSLGroup, "SSLGroup");
this.SSLGroup.Name = "SSLGroup";
this.SSLGroup.TabStop = false;
//
// AcceptSpecifiedHash
//
resources.ApplyResources(this.AcceptSpecifiedHash, "AcceptSpecifiedHash");
this.AcceptSpecifiedHash.Name = "AcceptSpecifiedHash";
this.AcceptSpecifiedHash.UseVisualStyleBackColor = true;
this.AcceptSpecifiedHash.CheckedChanged += new System.EventHandler(this.AcceptSpecifiedHash_CheckedChanged);
//
// SpecifiedHash
//
resources.ApplyResources(this.SpecifiedHash, "SpecifiedHash");
this.SpecifiedHash.Name = "SpecifiedHash";
//
// AcceptAnyHash
//
resources.ApplyResources(this.AcceptAnyHash, "AcceptAnyHash");
this.AcceptAnyHash.Name = "AcceptAnyHash";
this.AcceptAnyHash.UseVisualStyleBackColor = true;
this.AcceptAnyHash.CheckedChanged += new System.EventHandler(this.AcceptAnyHash_CheckedChanged);
//
// label6
//
resources.ApplyResources(this.label6, "label6");
this.label6.Name = "label6";
//
// FTPUI
//
this.Controls.Add(this.label6);
this.Controls.Add(this.UseSSL);
this.Controls.Add(this.SSLGroup);
this.Controls.Add(this.Username);
this.Controls.Add(this.Password);
this.Controls.Add(this.label4);
this.Controls.Add(this.CreateFolderButton);
this.Controls.Add(this.label3);
this.Controls.Add(this.PassiveConnection);
this.Controls.Add(this.TestConnection);
this.Controls.Add(this.Port);
this.Controls.Add(this.Path);
this.Controls.Add(this.Servername);
this.Controls.Add(this.label5);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Name = "FTPUI";
resources.ApplyResources(this, "$this");
this.Load += new System.EventHandler(this.FTPUI_Load);
((System.ComponentModel.ISupportInitialize)(this.Port)).EndInit();
this.SSLGroup.ResumeLayout(false);
this.SSLGroup.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox Servername;
private System.Windows.Forms.TextBox Path;
private System.Windows.Forms.TextBox Username;
private Duplicati.Winforms.Controls.PasswordControl Password;
private System.Windows.Forms.NumericUpDown Port;
private System.Windows.Forms.Button TestConnection;
private System.Windows.Forms.CheckBox PassiveConnection;
private System.Windows.Forms.Button CreateFolderButton;
private System.Windows.Forms.CheckBox UseSSL;
private System.Windows.Forms.GroupBox SSLGroup;
private System.Windows.Forms.CheckBox AcceptSpecifiedHash;
private System.Windows.Forms.TextBox SpecifiedHash;
private System.Windows.Forms.CheckBox AcceptAnyHash;
private System.Windows.Forms.Label label6;
}
}
+39 -18
View File
@@ -144,7 +144,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>14</value>
<value>15</value>
</data>
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -171,7 +171,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
<value>13</value>
<value>14</value>
</data>
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -198,7 +198,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;label3.ZOrder" xml:space="preserve">
<value>6</value>
<value>7</value>
</data>
<data name="label4.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -225,7 +225,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;label4.ZOrder" xml:space="preserve">
<value>4</value>
<value>5</value>
</data>
<data name="label5.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -252,7 +252,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;label5.ZOrder" xml:space="preserve">
<value>12</value>
<value>13</value>
</data>
<data name="Servername.Location" type="System.Drawing.Point, System.Drawing">
<value>96, 16</value>
@@ -273,7 +273,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;Servername.ZOrder" xml:space="preserve">
<value>11</value>
<value>12</value>
</data>
<data name="Path.Location" type="System.Drawing.Point, System.Drawing">
<value>96, 40</value>
@@ -294,7 +294,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;Path.ZOrder" xml:space="preserve">
<value>10</value>
<value>11</value>
</data>
<data name="Username.Location" type="System.Drawing.Point, System.Drawing">
<value>96, 64</value>
@@ -315,14 +315,11 @@
<value>$this</value>
</data>
<data name="&gt;&gt;Username.ZOrder" xml:space="preserve">
<value>2</value>
<value>3</value>
</data>
<data name="Password.Location" type="System.Drawing.Point, System.Drawing">
<value>96, 88</value>
</data>
<data name="Password.PasswordChar" type="System.Char, mscorlib" xml:space="preserve">
<value>*</value>
</data>
<data name="Password.Size" type="System.Drawing.Size, System.Drawing">
<value>176, 20</value>
</data>
@@ -339,7 +336,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;Password.ZOrder" xml:space="preserve">
<value>3</value>
<value>4</value>
</data>
<data name="Port.Location" type="System.Drawing.Point, System.Drawing">
<value>96, 112</value>
@@ -360,7 +357,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;Port.ZOrder" xml:space="preserve">
<value>9</value>
<value>10</value>
</data>
<data name="TestConnection.Location" type="System.Drawing.Point, System.Drawing">
<value>368, 184</value>
@@ -384,7 +381,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;TestConnection.ZOrder" xml:space="preserve">
<value>8</value>
<value>9</value>
</data>
<data name="PassiveConnection.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -411,7 +408,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;PassiveConnection.ZOrder" xml:space="preserve">
<value>7</value>
<value>8</value>
</data>
<data name="CreateFolderButton.Location" type="System.Drawing.Point, System.Drawing">
<value>392, 40</value>
@@ -435,7 +432,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;CreateFolderButton.ZOrder" xml:space="preserve">
<value>5</value>
<value>6</value>
</data>
<data name="UseSSL.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -466,7 +463,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;UseSSL.ZOrder" xml:space="preserve">
<value>0</value>
<value>1</value>
</data>
<data name="AcceptSpecifiedHash.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -574,7 +571,31 @@
<value>$this</value>
</data>
<data name="&gt;&gt;SSLGroup.ZOrder" xml:space="preserve">
<value>1</value>
<value>2</value>
</data>
<data name="label6.Location" type="System.Drawing.Point, System.Drawing">
<value>16, 176</value>
</data>
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
<value>344, 56</value>
</data>
<data name="label6.TabIndex" type="System.Int32, mscorlib">
<value>31</value>
</data>
<data name="label6.Text" xml:space="preserve">
<value>Note: Some FTP servers have trouble dealing with more than 2000 files. For this reason, you are advised to select a large volume size so the number of files is low.</value>
</data>
<data name="&gt;&gt;label6.Name" xml:space="preserve">
<value>label6</value>
</data>
<data name="&gt;&gt;label6.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label6.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;label6.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
+37 -1
View File
@@ -194,5 +194,41 @@ namespace Duplicati.Library.Backend.Strings {
return ResourceManager.GetString("MissingFolderError", resourceCulture);
}
}
}
/// <summary>
/// Looks up a localized string similar to The file {0} was uploaded but not found afterwards, the file listing returned {1}.
/// </summary>
internal static string ListVerifyFailure {
get {
return ResourceManager.GetString("ListVerifyFailure", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The file {0} was uploaded but the returned size was {1} and it was expected to be {2}.
/// </summary>
internal static string ListVerifySizeFailure {
get {
return ResourceManager.GetString("ListVerifySizeFailure", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Disable upload verification.
/// </summary>
internal static string DescriptionDisableUploadVerifyShort {
get {
return ResourceManager.GetString("DescriptionDisableUploadVerifyShort", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to To protect against network failures, every upload will be attempted verified. Use this option to disable this verfication to make the upload faster by more unsafe..
/// </summary>
internal static string DescriptionDisableUploadVerifyLong {
get {
return ResourceManager.GetString("DescriptionDisableUploadVerifyLong", resourceCulture);
}
}
}
}
@@ -162,4 +162,16 @@
<data name="MissingFolderError" xml:space="preserve">
<value>The folder {0} was not found, message: {1}</value>
</data>
<data name="ListVerifyFailure" xml:space="preserve">
<value>The file {0} was uploaded but not found afterwards, the file listing returned {1}</value>
</data>
<data name="ListVerifySizeFailure" xml:space="preserve">
<value>The file {0} was uploaded but the returned size was {1} and it was expected to be {2}</value>
</data>
<data name="DescriptionDisableUploadVerifyShort" xml:space="preserve">
<value>Disable upload verification</value>
</data>
<data name="DescriptionDisableUploadVerifyLong" xml:space="preserve">
<value>To protect against network failures, every upload will be attempted verified. Use this option to disable this verfication to make the upload faster by more unsafe.</value>
</data>
</root>
+20 -8
View File
@@ -47,17 +47,29 @@ namespace Duplicati.Library.Backend
if (m_path.IndexOf("@") > 0)
{
m_username = m_path.Substring(0, m_path.IndexOf("@"));
m_path = m_path.Substring(m_path.IndexOf("@") + 1);
if (m_username.IndexOf(":") > 0)
//Bugfix: cannot access paths with @ in the path
if (m_username.Contains("/") || m_username.Contains("\\") || m_username.Contains(System.IO.Path.DirectorySeparatorChar.ToString()))
{
m_password = m_username.Substring(0, m_username.IndexOf(":"));
m_username = m_username.Substring(m_username.IndexOf(":") + 1);
m_username = null;
if (options.ContainsKey("ftp-username"))
m_username = options["ftp-username"];
if (options.ContainsKey("ftp-password"))
m_password = options["ftp-password"];
}
else
{
if (options.ContainsKey("ftp-password"))
m_password = options["ftp-password"];
m_path = m_path.Substring(m_path.IndexOf("@") + 1);
if (m_username.IndexOf(":") > 0)
{
m_password = m_username.Substring(0, m_username.IndexOf(":"));
m_username = m_username.Substring(m_username.IndexOf(":") + 1);
}
else
{
if (options.ContainsKey("ftp-password"))
m_password = options["ftp-password"];
}
}
}
else
@@ -239,7 +251,7 @@ namespace Duplicati.Library.Backend
get
{
return new List<ICommandLineArgument>(new ICommandLineArgument[] {
new CommandLineArgument("ftp-password", CommandLineArgument.ArgumentType.String, Strings.FileBackend.DescriptionFTPPasswordShort, Strings.FileBackend.DescriptionFTPPasswordLong),
new CommandLineArgument("ftp-password", CommandLineArgument.ArgumentType.Password, Strings.FileBackend.DescriptionFTPPasswordShort, Strings.FileBackend.DescriptionFTPPasswordLong),
new CommandLineArgument("ftp-username", CommandLineArgument.ArgumentType.String, Strings.FileBackend.DescriptionFTPUsernameShort, Strings.FileBackend.DescriptionFTPUsernameLong),
new CommandLineArgument(OPTION_DESTINATION_MARKER, CommandLineArgument.ArgumentType.String, Strings.FileBackend.AlternateDestinationMarkerShort, string.Format(Strings.FileBackend.AlternateDestinationMarkerLong, OPTION_ALTERNATE_PATHS)),
new CommandLineArgument(OPTION_ALTERNATE_PATHS, CommandLineArgument.ArgumentType.Path, Strings.FileBackend.AlternateTargetPathsShort, string.Format(Strings.FileBackend.AlternateTargetPathsLong, OPTION_DESTINATION_MARKER, System.IO.Path.PathSeparator)),
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
@@ -141,7 +141,7 @@ namespace Duplicati.Library.Backend
break;
}
results.Add(file.Title, new TaggedFileEntry(file.Title, file.QuotaBytesUsed, file.LastViewed, file.Updated, file.ResourceId, file.DocumentEntry.Content.Src.ToString(), updateUrl, file.ETag));
results.Add(file.Title, new TaggedFileEntry(file.Title, (long)file.QuotaBytesUsed, file.LastViewed, file.Updated, file.ResourceId, file.DocumentEntry.Content.Src.ToString(), updateUrl, file.ETag));
}
return results;
}
@@ -152,15 +152,39 @@ namespace Duplicati.Library.Backend
Dictionary<string, Google.Documents.Document> dict = new Dictionary<string, Google.Documents.Document>();
foreach (Google.Documents.Document d in data)
parentlookup.Add(d.AtomEntry.EditUri.Content, d);
{
// note: some files have no Edit Uri (for ex. shared by different user)
if (d.AtomEntry.EditUri != null && d.AtomEntry.EditUri.Content != null)
{
parentlookup.Add(d.AtomEntry.EditUri.Content, d);
}
}
foreach (Google.Documents.Document d in parentlookup.Values)
{
string[] p = new string[d.ParentFolders.Count + 1];
for (int i = 0; i < p.Length - 1; i++)
p[i] = parentlookup[d.ParentFolders[i]].Title;
List<Google.Documents.Document> parents = new List<Google.Documents.Document>();
Google.Documents.Document cur = d;
while (cur.ParentFolders.Count == 1)
{
parents.Add(cur);
cur = parentlookup[cur.ParentFolders[0]];
}
parents.Add(cur);
if (cur.ParentFolders.Count != 0)
{
string[] pids = new string[cur.ParentFolders.Count];
for(int i = 0; i < pids.Length; i++)
pids[i] = parentlookup[cur.ParentFolders[i]].Title;
throw new Exception(string.Format(Strings.GoogleDocs.FolderHasMultipleOwnersError, cur.Title, string.Join(", ", pids)));
}
parents.Reverse();
string[] p = new string[parents.Count];
for (int i = 0; i < p.Length; i++)
p[i] = parents[i].Title;
p[p.Length - 1] = d.Title;
string key = string.Join("/", p);
if (dict.ContainsKey(key))
throw new Exception(string.Format(Strings.GoogleDocs.DuplicateFoldernameFoundError, key));
@@ -317,10 +341,10 @@ namespace Duplicati.Library.Backend
{
get {
return new List<ICommandLineArgument>(new ICommandLineArgument[] {
new CommandLineArgument("ftp-password", CommandLineArgument.ArgumentType.String, Strings.GoogleDocs.DescriptionFTPPasswordShort, Strings.GoogleDocs.DescriptionFTPPasswordLong),
new CommandLineArgument("ftp-password", CommandLineArgument.ArgumentType.Password, Strings.GoogleDocs.DescriptionFTPPasswordShort, Strings.GoogleDocs.DescriptionFTPPasswordLong),
new CommandLineArgument("ftp-username", CommandLineArgument.ArgumentType.String, Strings.GoogleDocs.DescriptionFTPUsernameShort, Strings.GoogleDocs.DescriptionFTPUsernameLong),
new CommandLineArgument(USERNAME_OPTION, CommandLineArgument.ArgumentType.String, Strings.GoogleDocs.DescriptionGooglePasswordShort, Strings.GoogleDocs.DescriptionGooglePasswordLong, null, new string[] {"ftp-password"}),
new CommandLineArgument(PASSWORD_OPTION, CommandLineArgument.ArgumentType.String, Strings.GoogleDocs.DescriptionGoogleUsernameShort, Strings.GoogleDocs.DescriptionGoogleUsernameLong, null, new string[] {"ftp-username"}),
new CommandLineArgument(PASSWORD_OPTION, CommandLineArgument.ArgumentType.Password, Strings.GoogleDocs.DescriptionGoogleUsernameShort, Strings.GoogleDocs.DescriptionGoogleUsernameLong, null, new string[] {"ftp-username"}),
new CommandLineArgument(ATTRIBUTES_OPTION, CommandLineArgument.ArgumentType.String, Strings.GoogleDocs.DescriptionGoogleLabelsShort, string.Format(Strings.GoogleDocs.DescriptionGoogleLabelsLong, string.Join(",", KNOWN_LABELS)), DEFAULT_LABELS),
});
}
@@ -433,7 +457,9 @@ namespace Duplicati.Library.Backend
//This is a blank marker request
req.ContentLength = 0;
req.ContentType = "text/plain";
//Bad... docs say "text/plain" or "text/xml", but really needs to be content type, otherwise overwrite fails
//req.ContentType = "text/plain";
req.ContentType = "application/octet-stream";
//Authenticate our request
m_cla.ApplyAuthenticationToRequest(req);
@@ -503,8 +529,6 @@ namespace Duplicati.Library.Backend
using (System.IO.Stream s = resp.GetResponseStream())
xml.Load(s);
string tmp = xml.ToString();
System.Xml.XmlNamespaceManager mgr = new XmlNamespaceManager(xml.NameTable);
mgr.AddNamespace("atom", "http://www.w3.org/2005/Atom");
mgr.AddNamespace("gd", "http://schemas.google.com/g/2005");
@@ -538,10 +562,24 @@ namespace Duplicati.Library.Backend
}
catch (WebException wex)
{
//Accept the 308 until we are complete
if (wex.Status == WebExceptionStatus.ProtocolError &&
bool acceptedError =
wex.Status == WebExceptionStatus.ProtocolError &&
wex.Response is HttpWebResponse &&
(int)((HttpWebResponse)wex.Response).StatusCode == 308 &&
(int)((HttpWebResponse)wex.Response).StatusCode == 308;
//Mono does not give us the response object,
// so we rely on the error code being present
// in the string, not ideal, but I have found
// no other workaround :(
if (Duplicati.Library.Utility.Utility.IsMono)
{
acceptedError |=
wex.Status == WebExceptionStatus.ProtocolError &&
wex.Message.Contains("308");
}
//Accept the 308 until we are complete
if (acceptedError &&
initialPosition + postbytes != stream.Length)
{
retries = 0;
@@ -556,7 +594,7 @@ namespace Duplicati.Library.Backend
if (retries > 2)
throw;
else
System.Threading.Thread.Sleep(1000);
System.Threading.Thread.Sleep(2000 * retries);
stream.Position = initialPosition;
}
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.239
// Runtime Version:4.0.30319.269
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -204,6 +204,15 @@ namespace Duplicati.Library.Backend.Strings {
}
}
/// <summary>
/// Looks up a localized string similar to The folder {0} is owned by multiple parents: {1}, this is not supported.
/// </summary>
internal static string FolderHasMultipleOwnersError {
get {
return ResourceManager.GetString("FolderHasMultipleOwnersError", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The nonce returned was not recognized: {0}.
/// </summary>
@@ -112,10 +112,10 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="CaptchaRequiredError" xml:space="preserve">
<value>The account access has been blocked by Google, please visit this URL and unlock it: {0}</value>
@@ -165,6 +165,9 @@
<data name="FileIsReadOnlyError" xml:space="preserve">
<value>The requested file is read-only: {0}</value>
</data>
<data name="FolderHasMultipleOwnersError" xml:space="preserve">
<value>The folder {0} is owned by multiple parents: {1}, this is not supported</value>
</data>
<data name="InvalidNonceError" xml:space="preserve">
<value>The nonce returned was not recognized: {0}</value>
</data>
@@ -130,6 +130,7 @@
<EmbeddedResource Include="Strings\S3SettingsControl.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>S3SettingsControl.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Strings\S3UI.resx">
<Generator>ResXFileCodeGenerator</Generator>
+12 -9
View File
@@ -40,15 +40,18 @@ namespace Duplicati.Library.Backend
new KeyValuePair<string, string>("Dunkel", "dcs.dunkel.de"),
};
//Updated list: http://docs.amazonwebservices.com/general/latest/gr/rande.html#s3_region
public static readonly KeyValuePair<string, string>[] KNOWN_S3_LOCATIONS = new KeyValuePair<string, string>[] {
new KeyValuePair<string, string>("(default)", ""),
new KeyValuePair<string, string>("Europe", "eu-west-1"),
new KeyValuePair<string, string>("US East", "us-east-1"),
new KeyValuePair<string, string>("US West", "us-west-1"),
new KeyValuePair<string, string>("AP Southeast", "ap-southeast-1"),
new KeyValuePair<string, string>("AP Northeast", "ap-northeast-1"),
new KeyValuePair<string, string>("Europe (EU, Ireland)", "EU"),
new KeyValuePair<string, string>("US East (Northern Virginia)", "us-east-1"),
new KeyValuePair<string, string>("US West (Northen California)", "us-west-1"),
new KeyValuePair<string, string>("US West (Oregon)", "us-west-2"),
new KeyValuePair<string, string>("Asia Pacific (Singapore)", "ap-southeast-1"),
new KeyValuePair<string, string>("Asia Pacific (Sydney)", "ap-southeast-2"),
new KeyValuePair<string, string>("Asia Pacific (Tokyo)", "ap-northeast-1"),
new KeyValuePair<string, string>("South America (Sao Paulo)", "sa-east-1"),
};
private string m_bucket;
private string m_prefix;
@@ -288,15 +291,15 @@ namespace Duplicati.Library.Backend
locations.AppendLine(string.Format("{0}: {1}", s.Key, s.Value));
return new List<ICommandLineArgument>(new ICommandLineArgument[] {
new CommandLineArgument("aws_secret_access_key", CommandLineArgument.ArgumentType.Path, Strings.S3Backend.AMZKeyDescriptionShort, Strings.S3Backend.AMZKeyDescriptionLong, null, new string[] {"ftp-password"}, null),
new CommandLineArgument("aws_access_key_id", CommandLineArgument.ArgumentType.Path, Strings.S3Backend.AMZUserIDDescriptionShort, Strings.S3Backend.AMZUserIDDescriptionLong, null, new string[] {"ftp-username"}, null),
new CommandLineArgument("aws_secret_access_key", CommandLineArgument.ArgumentType.Password, Strings.S3Backend.AMZKeyDescriptionShort, Strings.S3Backend.AMZKeyDescriptionLong, null, new string[] {"ftp-password"}, null),
new CommandLineArgument("aws_access_key_id", CommandLineArgument.ArgumentType.String, Strings.S3Backend.AMZUserIDDescriptionShort, Strings.S3Backend.AMZUserIDDescriptionLong, null, new string[] {"ftp-username"}, null),
new CommandLineArgument(SUBDOMAIN_OPTION, CommandLineArgument.ArgumentType.Boolean, Strings.S3Backend.S3NewStyleDescriptionShort, Strings.S3Backend.S3NewStyleDescriptionLong, "true", null, null, Strings.S3Backend.S3NewStyleDeprecation),
new CommandLineArgument(EU_BUCKETS_OPTION, CommandLineArgument.ArgumentType.Boolean, Strings.S3Backend.S3EurobucketDescriptionShort, Strings.S3Backend.S3EurobucketDescriptionLong, "false", null, null, string.Format(Strings.S3Backend.S3EurobucketDeprecationDescription, LOCATION_OPTION, S3_EU_REGION_NAME)),
new CommandLineArgument(RRS_OPTION, CommandLineArgument.ArgumentType.Boolean, Strings.S3Backend.S3UseRRSDescriptionShort, Strings.S3Backend.S3UseRRSDescriptionLong, "false"),
new CommandLineArgument(SERVER_NAME, CommandLineArgument.ArgumentType.String, Strings.S3Backend.S3ServerNameDescriptionShort, string.Format(Strings.S3Backend.S3ServerNameDescriptionLong, hostnames.ToString()), DEFAULT_S3_HOST),
new CommandLineArgument(LOCATION_OPTION, CommandLineArgument.ArgumentType.String, Strings.S3Backend.S3LocationDescriptionShort, string.Format(Strings.S3Backend.S3LocationDescriptionLong, locations.ToString())),
new CommandLineArgument(SSL_OPTION, CommandLineArgument.ArgumentType.Boolean, Strings.S3Backend.DescriptionUseSSLShort, Strings.S3Backend.DescriptionUseSSLLong),
new CommandLineArgument("ftp-password", CommandLineArgument.ArgumentType.String, Strings.S3Backend.FTPPasswordDescriptionShort, Strings.S3Backend.FTPPasswordDescriptionLong),
new CommandLineArgument("ftp-password", CommandLineArgument.ArgumentType.Password, Strings.S3Backend.FTPPasswordDescriptionShort, Strings.S3Backend.FTPPasswordDescriptionLong),
new CommandLineArgument("ftp-username", CommandLineArgument.ArgumentType.String, Strings.S3Backend.DescriptionFTPUsernameShort, Strings.S3Backend.DescriptionFTPUsernameLong),
});
+5 -5
View File
@@ -46,10 +46,10 @@
//
// CredentialGroup
//
resources.ApplyResources(this.CredentialGroup, "CredentialGroup");
this.CredentialGroup.Controls.Add(this.RemoveSelectedButton);
this.CredentialGroup.Controls.Add(this.RemoveAllButton);
this.CredentialGroup.Controls.Add(this.CredentialList);
resources.ApplyResources(this.CredentialGroup, "CredentialGroup");
this.CredentialGroup.Name = "CredentialGroup";
this.CredentialGroup.TabStop = false;
//
@@ -69,26 +69,26 @@
//
// CredentialList
//
resources.ApplyResources(this.CredentialList, "CredentialList");
this.CredentialList.FormattingEnabled = true;
resources.ApplyResources(this.CredentialList, "CredentialList");
this.CredentialList.Name = "CredentialList";
this.CredentialList.SelectedIndexChanged += new System.EventHandler(this.CredentialList_SelectedIndexChanged);
//
// groupBox2
//
resources.ApplyResources(this.groupBox2, "groupBox2");
this.groupBox2.Controls.Add(this.DefaultServername);
this.groupBox2.Controls.Add(this.label2);
this.groupBox2.Controls.Add(this.DefaultBucketRegion);
this.groupBox2.Controls.Add(this.label1);
this.groupBox2.Controls.Add(this.UseRRS);
resources.ApplyResources(this.groupBox2, "groupBox2");
this.groupBox2.Name = "groupBox2";
this.groupBox2.TabStop = false;
//
// DefaultServername
//
resources.ApplyResources(this.DefaultServername, "DefaultServername");
this.DefaultServername.FormattingEnabled = true;
resources.ApplyResources(this.DefaultServername, "DefaultServername");
this.DefaultServername.Name = "DefaultServername";
this.DefaultServername.SelectedIndexChanged += new System.EventHandler(this.DefaultServername_SelectedIndexChanged);
//
@@ -99,8 +99,8 @@
//
// DefaultBucketRegion
//
resources.ApplyResources(this.DefaultBucketRegion, "DefaultBucketRegion");
this.DefaultBucketRegion.FormattingEnabled = true;
resources.ApplyResources(this.DefaultBucketRegion, "DefaultBucketRegion");
this.DefaultBucketRegion.Name = "DefaultBucketRegion";
this.DefaultBucketRegion.SelectedIndexChanged += new System.EventHandler(this.DefaultBucketRegion_SelectedIndexChanged);
//
@@ -117,29 +117,22 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="CredentialGroup.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Bottom, Left, Right</value>
</data>
<data name="RemoveSelectedButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Right</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="RemoveSelectedButton.Enabled" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="RemoveSelectedButton.Location" type="System.Drawing.Point, System.Drawing">
<value>54, 107</value>
<value>328, 19</value>
</data>
<data name="RemoveSelectedButton.Size" type="System.Drawing.Size, System.Drawing">
<value>99, 23</value>
<value>96, 23</value>
</data>
<data name="RemoveSelectedButton.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="RemoveSelectedButton.Text" xml:space="preserve">
<value>Remove selected</value>
<value>Remove</value>
</data>
<data name="&gt;&gt;RemoveSelectedButton.Name" xml:space="preserve">
<value>RemoveSelectedButton</value>
@@ -153,17 +146,14 @@
<data name="&gt;&gt;RemoveSelectedButton.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="RemoveAllButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Right</value>
</data>
<data name="RemoveAllButton.Location" type="System.Drawing.Point, System.Drawing">
<value>158, 107</value>
<value>328, 48</value>
</data>
<data name="RemoveAllButton.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
<value>96, 23</value>
</data>
<data name="RemoveAllButton.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
<value>2</value>
</data>
<data name="RemoveAllButton.Text" xml:space="preserve">
<value>Remove all</value>
@@ -180,17 +170,14 @@
<data name="&gt;&gt;RemoveAllButton.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="CredentialList.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Bottom, Left, Right</value>
</data>
<data name="CredentialList.Location" type="System.Drawing.Point, System.Drawing">
<value>16, 24</value>
<value>9, 18</value>
</data>
<data name="CredentialList.Size" type="System.Drawing.Size, System.Drawing">
<value>214, 69</value>
<value>313, 108</value>
</data>
<data name="CredentialList.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
<value>1</value>
</data>
<data name="&gt;&gt;CredentialList.Name" xml:space="preserve">
<value>CredentialList</value>
@@ -205,13 +192,13 @@
<value>2</value>
</data>
<data name="CredentialGroup.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 32</value>
<value>5, 32</value>
</data>
<data name="CredentialGroup.Size" type="System.Drawing.Size, System.Drawing">
<value>246, 139</value>
<value>434, 138</value>
</data>
<data name="CredentialGroup.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
<value>2</value>
</data>
<data name="CredentialGroup.Text" xml:space="preserve">
<value>Stored credentials</value>
@@ -228,20 +215,14 @@
<data name="&gt;&gt;CredentialGroup.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="groupBox2.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Left, Right</value>
</data>
<data name="DefaultServername.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
</data>
<data name="DefaultServername.Location" type="System.Drawing.Point, System.Drawing">
<value>104, 24</value>
<value>103, 18</value>
</data>
<data name="DefaultServername.Size" type="System.Drawing.Size, System.Drawing">
<value>120, 21</value>
<value>321, 21</value>
</data>
<data name="DefaultServername.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
<value>1</value>
</data>
<data name="&gt;&gt;DefaultServername.Name" xml:space="preserve">
<value>DefaultServername</value>
@@ -258,20 +239,21 @@
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="label2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
<value>16, 24</value>
<value>6, 21</value>
</data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>64, 13</value>
<value>70, 13</value>
</data>
<data name="label2.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
<value>0</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Servername</value>
<value>Server name:</value>
</data>
<data name="&gt;&gt;label2.Name" xml:space="preserve">
<value>label2</value>
@@ -285,17 +267,14 @@
<data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="DefaultBucketRegion.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
</data>
<data name="DefaultBucketRegion.Location" type="System.Drawing.Point, System.Drawing">
<value>104, 48</value>
<value>103, 45</value>
</data>
<data name="DefaultBucketRegion.Size" type="System.Drawing.Size, System.Drawing">
<value>120, 21</value>
<value>321, 21</value>
</data>
<data name="DefaultBucketRegion.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
<value>2</value>
</data>
<data name="&gt;&gt;DefaultBucketRegion.Name" xml:space="preserve">
<value>DefaultBucketRegion</value>
@@ -313,16 +292,16 @@
<value>True</value>
</data>
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>16, 48</value>
<value>6, 48</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>73, 13</value>
<value>76, 13</value>
</data>
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
<value>0</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Bucket region</value>
<value>Bucket region:</value>
</data>
<data name="&gt;&gt;label1.Name" xml:space="preserve">
<value>label1</value>
@@ -343,13 +322,13 @@
<value>NoControl</value>
</data>
<data name="UseRRS.Location" type="System.Drawing.Point, System.Drawing">
<value>16, 72</value>
<value>9, 72</value>
</data>
<data name="UseRRS.Size" type="System.Drawing.Size, System.Drawing">
<value>196, 17</value>
</data>
<data name="UseRRS.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
<value>3</value>
</data>
<data name="UseRRS.Text" xml:space="preserve">
<value>Use Reduced Redundancy Storage</value>
@@ -367,13 +346,13 @@
<value>4</value>
</data>
<data name="groupBox2.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 179</value>
<value>5, 181</value>
</data>
<data name="groupBox2.Size" type="System.Drawing.Size, System.Drawing">
<value>246, 100</value>
<value>434, 100</value>
</data>
<data name="groupBox2.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
<value>3</value>
</data>
<data name="groupBox2.Text" xml:space="preserve">
<value>Default settings</value>
@@ -397,13 +376,13 @@
<value>NoControl</value>
</data>
<data name="AllowCredentialStorage.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 8</value>
<value>5, 10</value>
</data>
<data name="AllowCredentialStorage.Size" type="System.Drawing.Size, System.Drawing">
<value>186, 17</value>
</data>
<data name="AllowCredentialStorage.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
<value>1</value>
</data>
<data name="AllowCredentialStorage.Text" xml:space="preserve">
<value>Store new S3 account information</value>
@@ -430,7 +409,7 @@
<value>True</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>265, 284</value>
<value>445, 283</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>S3CommonOptions</value>
+15 -6
View File
@@ -46,6 +46,7 @@ namespace Duplicati.Library.Backend
cfg.ServiceURL = servername;
cfg.UserAgent = "Duplicati v" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString() + " S3 client with AWS SDK v" + cfg.GetType().Assembly.GetName().Version.ToString();
cfg.UseSecureStringForAwsSecretKey = false;
cfg.BufferSize = (int)Duplicati.Library.Utility.Utility.DEFAULT_BUFFER_SIZE;
m_client = new Amazon.S3.AmazonS3Client(awsID, awsKey, cfg);
@@ -142,12 +143,20 @@ namespace Duplicati.Library.Backend
foreach (S3Object obj in listResponse.S3Objects)
{
files.Add(new FileEntry(
obj.Key,
obj.Size,
DateTime.Parse(obj.LastModified),
DateTime.Parse(obj.LastModified)
));
DateTime dt;
if (DateTime.TryParse(obj.LastModified, out dt))
files.Add(new FileEntry(
obj.Key,
obj.Size,
dt,
dt
));
else
files.Add(new FileEntry(
obj.Key,
obj.Size
));
}
//filename = files[files.Count - 1].Name;
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.237
// Runtime Version:4.0.30319.235
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -70,7 +70,7 @@ namespace Duplicati.Library.Backend.Strings {
}
/// <summary>
/// Looks up a localized string similar to S3 Options.
/// Looks up a localized string similar to S3.
/// </summary>
internal static string PageTitle {
get {
@@ -121,6 +121,6 @@
<value>Displays various options related to the S3 backend</value>
</data>
<data name="PageTitle" xml:space="preserve">
<value>S3 Options</value>
<value>S3</value>
</data>
</root>
</root>
@@ -154,6 +154,7 @@
<EmbeddedResource Include="Strings\SSHSettingsControl.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>SSHSettingsControl.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Strings\SSHUI.resx">
<Generator>ResXFileCodeGenerator</Generator>
+123 -67
View File
@@ -198,7 +198,7 @@ namespace Duplicati.Library.Backend
return new List<ICommandLineArgument>(new ICommandLineArgument[] {
new CommandLineArgument(SFTP_PATH_OPTION, CommandLineArgument.ArgumentType.Path, Strings.SSHBackend.DescriptionSFTPCommandShort, Strings.SSHBackend.DescriptionSFTPCommandLong, Library.Utility.Utility.IsClientLinux ? "sftp" : "psftp.exe"),
new CommandLineArgument("ssh-options", CommandLineArgument.ArgumentType.String, Strings.SSHBackend.DescriptionSSHOptionsShort, Strings.SSHBackend.DescriptionSSHOptionsLong, "-C"),
new CommandLineArgument("ftp-password", CommandLineArgument.ArgumentType.String, Strings.SSHBackend.DescriptionFTPPasswordShort, Strings.SSHBackend.DescriptionFTPPasswordLong),
new CommandLineArgument("ftp-password", CommandLineArgument.ArgumentType.Password, Strings.SSHBackend.DescriptionFTPPasswordShort, Strings.SSHBackend.DescriptionFTPPasswordLong),
new CommandLineArgument("ftp-username", CommandLineArgument.ArgumentType.String, Strings.SSHBackend.DescriptionFTPUsernameShort, Strings.SSHBackend.DescriptionFTPUsernameLong),
new CommandLineArgument("debug-to-console", CommandLineArgument.ArgumentType.Boolean, Strings.SSHBackend.DescriptionDebugToConsoleShort, Strings.SSHBackend.DescriptionDebugToConsoleLong),
new CommandLineArgument("transfer-timeout", CommandLineArgument.ArgumentType.Timespan, Strings.SSHBackend.DescriptionTransferTimeoutShort, Strings.SSHBackend.DescriptionTransferTimeoutLong, "15m"),
@@ -560,38 +560,44 @@ namespace Duplicati.Library.Backend
if (changeDir && m_con != null)
return m_con;
SFTPCon con;
string keyfile;
m_options.TryGetValue(SSH_KEYFILE_OPTION, out keyfile);
if ((keyfile ?? "").Trim().Length > 0)
{
ValidateKeyFile(m_options[SSH_KEYFILE_OPTION]);
con = new SFTPCon(m_server, m_username);
con.AddIdentityFile(m_options[SSH_KEYFILE_OPTION], m_password);
}
else
con = new SFTPCon(m_server, m_username, m_password);
con.Connect(m_port);
try
{
if (!m_noCdCommand && !string.IsNullOrEmpty(m_path) && changeDir)
con.SetCurrenDir(m_path);
}
catch (Exception ex)
{
throw new Interface.FolderMissingException(string.Format(Strings.SSHBackend.FolderNotFoundManagedError, m_path, ex.Message), ex);
}
SFTPCon con;
string keyfile;
m_options.TryGetValue(SSH_KEYFILE_OPTION, out keyfile);
//If the connection is initialized to the right folder, we cache it
if (changeDir)
m_con = con;
if ((keyfile ?? "").Trim().Length > 0)
{
ValidateKeyFile(m_options[SSH_KEYFILE_OPTION]);
return con;
con = new SFTPCon(m_server, m_username);
con.AddIdentityFile(m_options[SSH_KEYFILE_OPTION], m_password);
}
else
con = new SFTPCon(m_server, m_username, m_password);
con.Connect(m_port);
try
{
if (!m_noCdCommand && !string.IsNullOrEmpty(m_path) && changeDir)
con.SetCurrenDir(m_path);
}
catch (Exception ex)
{
throw new Interface.FolderMissingException(string.Format(Strings.SSHBackend.FolderNotFoundManagedError, m_path, ex.Message), ex);
}
//If the connection is initialized to the right folder, we cache it
if (changeDir)
m_con = con;
return con;
}
catch (Tamir.SharpSsh.jsch.SftpException sx)
{
throw ReshapeSharpSSHException(sx);
}
}
private string getFullPath(string path)
@@ -610,11 +616,18 @@ namespace Duplicati.Library.Backend
string path = m_noCdCommand ? m_path : ".";
foreach (Tamir.SharpSsh.jsch.ChannelSftp.LsEntry ls in CreateManagedConnection(true).ListFiles(path))
if (ls.getFilename().ToString() != "." && ls.getFilename().ToString() != "..")
files.Add(new FileEntry(ls.getFilename().ToString(), ls.getAttrs().getSize(), epochOffset.Add(new TimeSpan(ls.getAttrs().getATime() * TimeSpan.TicksPerSecond)), epochOffset.Add(new TimeSpan(ls.getAttrs().getMTime() * TimeSpan.TicksPerSecond))));
return files;
try
{
foreach (Tamir.SharpSsh.jsch.ChannelSftp.LsEntry ls in CreateManagedConnection(true).ListFiles(path))
if (ls.getFilename().ToString() != "." && ls.getFilename().ToString() != "..")
files.Add(new FileEntry(ls.getFilename().ToString(), ls.getAttrs().getSize(), epochOffset.Add(new TimeSpan(ls.getAttrs().getATime() * TimeSpan.TicksPerSecond)), epochOffset.Add(new TimeSpan(ls.getAttrs().getMTime() * TimeSpan.TicksPerSecond))));
return files;
}
catch (Tamir.SharpSsh.jsch.SftpException sx)
{
throw ReshapeSharpSSHException(sx);
}
}
private void PutManaged(string remotename, string filename)
@@ -631,43 +644,52 @@ namespace Duplicati.Library.Backend
private void DeleteManaged(string remotename)
{
CreateManagedConnection(true).Delete(remotename);
try { CreateManagedConnection(true).Delete(remotename); }
catch (Tamir.SharpSsh.jsch.SftpException sx) { throw ReshapeSharpSSHException(sx); }
}
private void CreateFolderManaged()
{
string p = m_path;
using (SFTPCon con = CreateManagedConnection(false))
{
try
{
//Some SSH implementations fail if the folder name has a trailing slash
if (p.EndsWith ("/"))
p = p.Substring (0, p.Length - 1);
con.Mkdir(p);
}
catch
{
//For backwards compatibility, we also try to create the folder WITH a trailing slash,
// this should never work, but in case there is a SSH implementation that relies
// on this we try that too
if (p != m_path)
{
try
{
//If this succeeds, we continue
con.Mkdir(m_path);
return;
}
catch { }
}
//We report the original error
throw;
}
}
try
{
using (SFTPCon con = CreateManagedConnection(false))
{
try
{
//Some SSH implementations fail if the folder name has a trailing slash
if (p.EndsWith("/"))
p = p.Substring(0, p.Length - 1);
con.Mkdir(p);
}
catch
{
//For backwards compatibility, we also try to create the folder WITH a trailing slash,
// this should never work, but in case there is a SSH implementation that relies
// on this we try that too
if (p != m_path)
{
try
{
//If this succeeds, we continue
con.Mkdir(m_path);
return;
}
catch { }
}
//We report the original error
throw;
}
}
}
catch (Tamir.SharpSsh.jsch.SftpException sx)
{
throw ReshapeSharpSSHException(sx);
}
}
#endregion
@@ -712,7 +734,8 @@ namespace Duplicati.Library.Backend
if (!m_useManaged)
throw new Exception(Strings.SSHBackend.StreamingNotSupportedError);
CreateManagedConnection(true).Put(getFullPath(remotename), stream);
try { CreateManagedConnection(true).Put(getFullPath(remotename), stream); }
catch (Tamir.SharpSsh.jsch.SftpException sx) { throw ReshapeSharpSSHException(sx); }
}
public void Get(string remotename, System.IO.Stream stream)
@@ -720,11 +743,44 @@ namespace Duplicati.Library.Backend
if (!m_useManaged)
throw new Exception(Strings.SSHBackend.StreamingNotSupportedError);
CreateManagedConnection(true).Get(getFullPath(remotename), stream);
try { CreateManagedConnection(true).Get(getFullPath(remotename), stream); }
catch (Tamir.SharpSsh.jsch.SftpException sx) { throw ReshapeSharpSSHException(sx); }
}
#endregion
/// <summary>
/// Helper function that extracts error messages from SharpSSH style exceptions and converts them into regular .Net exception messages
/// </summary>
/// <param name="sx">The exception to convert</param>
/// <returns>The converted exception</returns>
private static Exception ReshapeSharpSSHException(Tamir.SharpSsh.jsch.SftpException sx)
{
string idstr;
if (sx.id == Tamir.SharpSsh.jsch.ChannelSftp.SSH_FX_OK)
idstr = "OK";
else if (sx.id == Tamir.SharpSsh.jsch.ChannelSftp.SSH_FX_EOF)
idstr = "EOF";
else if (sx.id == Tamir.SharpSsh.jsch.ChannelSftp.SSH_FX_NO_SUCH_FILE)
idstr = "NO_SUCH_FILE";
else if (sx.id == Tamir.SharpSsh.jsch.ChannelSftp.SSH_FX_PERMISSION_DENIED)
idstr = "PERMISSION_DENIED";
else if (sx.id == Tamir.SharpSsh.jsch.ChannelSftp.SSH_FX_FAILURE)
idstr = "FAILURE";
else if (sx.id == Tamir.SharpSsh.jsch.ChannelSftp.SSH_FX_BAD_MESSAGE)
idstr = "BAD_MESSAGE";
else if (sx.id == Tamir.SharpSsh.jsch.ChannelSftp.SSH_FX_NO_CONNECTION)
idstr = "NO_CONNECTION";
else if (sx.id == Tamir.SharpSsh.jsch.ChannelSftp.SSH_FX_CONNECTION_LOST)
idstr = "CONNECTION_LOST";
else if (sx.id == Tamir.SharpSsh.jsch.ChannelSftp.SSH_FX_OP_UNSUPPORTED)
idstr = "UNSUPPORTED";
else
idstr = "UNKNOWN";
return new Exception(string.Format("{0} - {1}: {2}", sx.id, idstr, sx.message), sx);
}
/// <summary>
/// A helper function for validating SSH key files, as the support for those is limited in the SharpSSH library
/// </summary>
@@ -123,16 +123,16 @@
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 8</value>
<value>8, 12</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>71, 13</value>
<value>61, 13</value>
</data>
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>Path to SFTP</value>
<value>SFTP path:</value>
</data>
<data name="&gt;&gt;label1.Name" xml:space="preserve">
<value>label1</value>
@@ -150,16 +150,16 @@
<value>True</value>
</data>
<data name="UseManagedAsDefault.Location" type="System.Drawing.Point, System.Drawing">
<value>16, 40</value>
<value>11, 35</value>
</data>
<data name="UseManagedAsDefault.Size" type="System.Drawing.Size, System.Drawing">
<value>166, 17</value>
</data>
<data name="UseManagedAsDefault.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
<value>3</value>
</data>
<data name="UseManagedAsDefault.Text" xml:space="preserve">
<value>Use managed SSH as default</value>
<value>Use managed SSH by default</value>
</data>
<data name="&gt;&gt;UseManagedAsDefault.Name" xml:space="preserve">
<value>UseManagedAsDefault</value>
@@ -178,13 +178,13 @@
<value>Top, Right</value>
</data>
<data name="BrowseForSFTPButton.Location" type="System.Drawing.Point, System.Drawing">
<value>184, 8</value>
<value>415, 9</value>
</data>
<data name="BrowseForSFTPButton.Size" type="System.Drawing.Size, System.Drawing">
<value>24, 20</value>
</data>
<data name="BrowseForSFTPButton.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
<value>2</value>
</data>
<data name="BrowseForSFTPButton.Text" xml:space="preserve">
<value>...</value>
@@ -201,17 +201,14 @@
<data name="&gt;&gt;BrowseForSFTPButton.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="SFTPPath.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value>
</data>
<data name="SFTPPath.Location" type="System.Drawing.Point, System.Drawing">
<value>80, 8</value>
<value>130, 9</value>
</data>
<data name="SFTPPath.Size" type="System.Drawing.Size, System.Drawing">
<value>104, 21</value>
<value>279, 21</value>
</data>
<data name="SFTPPath.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
<value>1</value>
</data>
<data name="&gt;&gt;SFTPPath.Name" xml:space="preserve">
<value>SFTPPath</value>
@@ -241,7 +238,7 @@
<value>6, 13</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>212, 67</value>
<value>445, 283</value>
</data>
<data name="&gt;&gt;BrowseForSFTPDialog.Name" xml:space="preserve">
<value>BrowseForSFTPDialog</value>
+230 -230
View File
@@ -1,230 +1,230 @@
namespace Duplicati.Library.Backend
{
partial class SSHUI
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SSHUI));
this.TestConnection = new System.Windows.Forms.Button();
this.Port = new System.Windows.Forms.NumericUpDown();
this.Password = new Duplicati.Winforms.Controls.PasswordControl();
this.Username = new System.Windows.Forms.TextBox();
this.Path = new System.Windows.Forms.TextBox();
this.Servername = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.UsePassword = new System.Windows.Forms.CheckBox();
this.GenerateDebugOutput = new System.Windows.Forms.CheckBox();
this.UseUnmanagedSSH = new System.Windows.Forms.CheckBox();
this.CreateFolderButton = new System.Windows.Forms.Button();
this.Keyfile = new System.Windows.Forms.TextBox();
this.Keyfilelabel = new System.Windows.Forms.Label();
this.BrowseForKeyFileButton = new System.Windows.Forms.Button();
this.OpenSSHKeyFileDialog = new System.Windows.Forms.OpenFileDialog();
((System.ComponentModel.ISupportInitialize)(this.Port)).BeginInit();
this.SuspendLayout();
//
// TestConnection
//
resources.ApplyResources(this.TestConnection, "TestConnection");
this.TestConnection.Name = "TestConnection";
this.TestConnection.UseVisualStyleBackColor = true;
this.TestConnection.Click += new System.EventHandler(this.TestConnection_Click);
//
// Port
//
resources.ApplyResources(this.Port, "Port");
this.Port.Maximum = new decimal(new int[] {
65500,
0,
0,
0});
this.Port.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.Port.Name = "Port";
this.Port.Value = new decimal(new int[] {
22,
0,
0,
0});
this.Port.ValueChanged += new System.EventHandler(this.Port_ValueChanged);
//
// Password
//
this.Password.AskToEnterNewPassword = false;
this.Password.IsPasswordVisible = false;
resources.ApplyResources(this.Password, "Password");
this.Password.MaximumSize = new System.Drawing.Size(5000, 20);
this.Password.MinimumSize = new System.Drawing.Size(150, 20);
this.Password.Name = "Password";
this.Password.TextChanged += new System.EventHandler(this.Password_TextChanged);
//
// Username
//
resources.ApplyResources(this.Username, "Username");
this.Username.Name = "Username";
this.Username.TextChanged += new System.EventHandler(this.Username_TextChanged);
//
// Path
//
resources.ApplyResources(this.Path, "Path");
this.Path.Name = "Path";
this.Path.TextChanged += new System.EventHandler(this.Path_TextChanged);
//
// Servername
//
resources.ApplyResources(this.Servername, "Servername");
this.Servername.Name = "Servername";
this.Servername.TextChanged += new System.EventHandler(this.Servername_TextChanged);
//
// label5
//
resources.ApplyResources(this.label5, "label5");
this.label5.Name = "label5";
//
// label3
//
resources.ApplyResources(this.label3, "label3");
this.label3.Name = "label3";
//
// label2
//
resources.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// UsePassword
//
resources.ApplyResources(this.UsePassword, "UsePassword");
this.UsePassword.Checked = true;
this.UsePassword.CheckState = System.Windows.Forms.CheckState.Checked;
this.UsePassword.Name = "UsePassword";
this.UsePassword.UseVisualStyleBackColor = true;
this.UsePassword.CheckedChanged += new System.EventHandler(this.UsePassword_CheckedChanged);
//
// GenerateDebugOutput
//
resources.ApplyResources(this.GenerateDebugOutput, "GenerateDebugOutput");
this.GenerateDebugOutput.Name = "GenerateDebugOutput";
this.GenerateDebugOutput.UseVisualStyleBackColor = true;
//
// UseUnmanagedSSH
//
resources.ApplyResources(this.UseUnmanagedSSH, "UseUnmanagedSSH");
this.UseUnmanagedSSH.Name = "UseUnmanagedSSH";
this.UseUnmanagedSSH.UseVisualStyleBackColor = true;
this.UseUnmanagedSSH.CheckedChanged += new System.EventHandler(this.UseUnmanagedSSH_CheckedChanged);
//
// CreateFolderButton
//
resources.ApplyResources(this.CreateFolderButton, "CreateFolderButton");
this.CreateFolderButton.Name = "CreateFolderButton";
this.CreateFolderButton.UseVisualStyleBackColor = true;
this.CreateFolderButton.Click += new System.EventHandler(this.CreateFolderButton_Click);
//
// Keyfile
//
resources.ApplyResources(this.Keyfile, "Keyfile");
this.Keyfile.Name = "Keyfile";
this.Keyfile.TextChanged += new System.EventHandler(this.Keyfile_TextChanged);
//
// Keyfilelabel
//
resources.ApplyResources(this.Keyfilelabel, "Keyfilelabel");
this.Keyfilelabel.Name = "Keyfilelabel";
//
// BrowseForKeyFileButton
//
resources.ApplyResources(this.BrowseForKeyFileButton, "BrowseForKeyFileButton");
this.BrowseForKeyFileButton.Name = "BrowseForKeyFileButton";
this.BrowseForKeyFileButton.UseVisualStyleBackColor = true;
this.BrowseForKeyFileButton.Click += new System.EventHandler(this.BrowseForKeyFileButton_Click);
//
// OpenSSHKeyFileDialog
//
resources.ApplyResources(this.OpenSSHKeyFileDialog, "OpenSSHKeyFileDialog");
//
// SSHUI
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.BrowseForKeyFileButton);
this.Controls.Add(this.Keyfile);
this.Controls.Add(this.Keyfilelabel);
this.Controls.Add(this.CreateFolderButton);
this.Controls.Add(this.UseUnmanagedSSH);
this.Controls.Add(this.GenerateDebugOutput);
this.Controls.Add(this.UsePassword);
this.Controls.Add(this.TestConnection);
this.Controls.Add(this.Port);
this.Controls.Add(this.Password);
this.Controls.Add(this.Username);
this.Controls.Add(this.Path);
this.Controls.Add(this.Servername);
this.Controls.Add(this.label5);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Name = "SSHUI";
this.Load += new System.EventHandler(this.SSHUI_PageLoad);
((System.ComponentModel.ISupportInitialize)(this.Port)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button TestConnection;
private System.Windows.Forms.NumericUpDown Port;
private Duplicati.Winforms.Controls.PasswordControl Password;
private System.Windows.Forms.TextBox Username;
private System.Windows.Forms.TextBox Path;
private System.Windows.Forms.TextBox Servername;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.CheckBox UsePassword;
private System.Windows.Forms.CheckBox GenerateDebugOutput;
private System.Windows.Forms.CheckBox UseUnmanagedSSH;
private System.Windows.Forms.Button CreateFolderButton;
private System.Windows.Forms.TextBox Keyfile;
private System.Windows.Forms.Label Keyfilelabel;
private System.Windows.Forms.Button BrowseForKeyFileButton;
private System.Windows.Forms.OpenFileDialog OpenSSHKeyFileDialog;
}
}
namespace Duplicati.Library.Backend
{
partial class SSHUI
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SSHUI));
this.TestConnection = new System.Windows.Forms.Button();
this.Port = new System.Windows.Forms.NumericUpDown();
this.Password = new Duplicati.Winforms.Controls.PasswordControl();
this.Username = new System.Windows.Forms.TextBox();
this.Path = new System.Windows.Forms.TextBox();
this.Servername = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.UsePassword = new System.Windows.Forms.CheckBox();
this.GenerateDebugOutput = new System.Windows.Forms.CheckBox();
this.UseUnmanagedSSH = new System.Windows.Forms.CheckBox();
this.CreateFolderButton = new System.Windows.Forms.Button();
this.Keyfile = new System.Windows.Forms.TextBox();
this.Keyfilelabel = new System.Windows.Forms.Label();
this.BrowseForKeyFileButton = new System.Windows.Forms.Button();
this.OpenSSHKeyFileDialog = new System.Windows.Forms.OpenFileDialog();
((System.ComponentModel.ISupportInitialize)(this.Port)).BeginInit();
this.SuspendLayout();
//
// TestConnection
//
resources.ApplyResources(this.TestConnection, "TestConnection");
this.TestConnection.Name = "TestConnection";
this.TestConnection.UseVisualStyleBackColor = true;
this.TestConnection.Click += new System.EventHandler(this.TestConnection_Click);
//
// Port
//
resources.ApplyResources(this.Port, "Port");
this.Port.Maximum = new decimal(new int[] {
65535,
0,
0,
0});
this.Port.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.Port.Name = "Port";
this.Port.Value = new decimal(new int[] {
22,
0,
0,
0});
this.Port.ValueChanged += new System.EventHandler(this.Port_ValueChanged);
//
// Password
//
this.Password.AskToEnterNewPassword = false;
this.Password.IsPasswordVisible = false;
resources.ApplyResources(this.Password, "Password");
this.Password.MaximumSize = new System.Drawing.Size(5000, 20);
this.Password.MinimumSize = new System.Drawing.Size(150, 20);
this.Password.Name = "Password";
this.Password.TextChanged += new System.EventHandler(this.Password_TextChanged);
//
// Username
//
resources.ApplyResources(this.Username, "Username");
this.Username.Name = "Username";
this.Username.TextChanged += new System.EventHandler(this.Username_TextChanged);
//
// Path
//
resources.ApplyResources(this.Path, "Path");
this.Path.Name = "Path";
this.Path.TextChanged += new System.EventHandler(this.Path_TextChanged);
//
// Servername
//
resources.ApplyResources(this.Servername, "Servername");
this.Servername.Name = "Servername";
this.Servername.TextChanged += new System.EventHandler(this.Servername_TextChanged);
//
// label5
//
resources.ApplyResources(this.label5, "label5");
this.label5.Name = "label5";
//
// label3
//
resources.ApplyResources(this.label3, "label3");
this.label3.Name = "label3";
//
// label2
//
resources.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// UsePassword
//
resources.ApplyResources(this.UsePassword, "UsePassword");
this.UsePassword.Checked = true;
this.UsePassword.CheckState = System.Windows.Forms.CheckState.Checked;
this.UsePassword.Name = "UsePassword";
this.UsePassword.UseVisualStyleBackColor = true;
this.UsePassword.CheckedChanged += new System.EventHandler(this.UsePassword_CheckedChanged);
//
// GenerateDebugOutput
//
resources.ApplyResources(this.GenerateDebugOutput, "GenerateDebugOutput");
this.GenerateDebugOutput.Name = "GenerateDebugOutput";
this.GenerateDebugOutput.UseVisualStyleBackColor = true;
//
// UseUnmanagedSSH
//
resources.ApplyResources(this.UseUnmanagedSSH, "UseUnmanagedSSH");
this.UseUnmanagedSSH.Name = "UseUnmanagedSSH";
this.UseUnmanagedSSH.UseVisualStyleBackColor = true;
this.UseUnmanagedSSH.CheckedChanged += new System.EventHandler(this.UseUnmanagedSSH_CheckedChanged);
//
// CreateFolderButton
//
resources.ApplyResources(this.CreateFolderButton, "CreateFolderButton");
this.CreateFolderButton.Name = "CreateFolderButton";
this.CreateFolderButton.UseVisualStyleBackColor = true;
this.CreateFolderButton.Click += new System.EventHandler(this.CreateFolderButton_Click);
//
// Keyfile
//
resources.ApplyResources(this.Keyfile, "Keyfile");
this.Keyfile.Name = "Keyfile";
this.Keyfile.TextChanged += new System.EventHandler(this.Keyfile_TextChanged);
//
// Keyfilelabel
//
resources.ApplyResources(this.Keyfilelabel, "Keyfilelabel");
this.Keyfilelabel.Name = "Keyfilelabel";
//
// BrowseForKeyFileButton
//
resources.ApplyResources(this.BrowseForKeyFileButton, "BrowseForKeyFileButton");
this.BrowseForKeyFileButton.Name = "BrowseForKeyFileButton";
this.BrowseForKeyFileButton.UseVisualStyleBackColor = true;
this.BrowseForKeyFileButton.Click += new System.EventHandler(this.BrowseForKeyFileButton_Click);
//
// OpenSSHKeyFileDialog
//
resources.ApplyResources(this.OpenSSHKeyFileDialog, "OpenSSHKeyFileDialog");
//
// SSHUI
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.BrowseForKeyFileButton);
this.Controls.Add(this.Keyfile);
this.Controls.Add(this.Keyfilelabel);
this.Controls.Add(this.CreateFolderButton);
this.Controls.Add(this.UseUnmanagedSSH);
this.Controls.Add(this.GenerateDebugOutput);
this.Controls.Add(this.UsePassword);
this.Controls.Add(this.TestConnection);
this.Controls.Add(this.Port);
this.Controls.Add(this.Password);
this.Controls.Add(this.Username);
this.Controls.Add(this.Path);
this.Controls.Add(this.Servername);
this.Controls.Add(this.label5);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Name = "SSHUI";
this.Load += new System.EventHandler(this.SSHUI_PageLoad);
((System.ComponentModel.ISupportInitialize)(this.Port)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button TestConnection;
private System.Windows.Forms.NumericUpDown Port;
private Duplicati.Winforms.Controls.PasswordControl Password;
private System.Windows.Forms.TextBox Username;
private System.Windows.Forms.TextBox Path;
private System.Windows.Forms.TextBox Servername;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.CheckBox UsePassword;
private System.Windows.Forms.CheckBox GenerateDebugOutput;
private System.Windows.Forms.CheckBox UseUnmanagedSSH;
private System.Windows.Forms.Button CreateFolderButton;
private System.Windows.Forms.TextBox Keyfile;
private System.Windows.Forms.Label Keyfilelabel;
private System.Windows.Forms.Button BrowseForKeyFileButton;
private System.Windows.Forms.OpenFileDialog OpenSSHKeyFileDialog;
}
}
@@ -524,11 +524,10 @@ namespace Duplicati.Library.SharpExpect
{
sr = (System.IO.StreamReader)input;
char[] buf = new char[1024];
bool lastRun = false;
List<string> queue = sr == m_process.StandardError ? m_stdErr : m_stdOut;
//Keep reading until the process exits
while (true)
//Keep reading while the stream is not at and
while (!sr.EndOfStream)
{
int r = sr.Read(buf, 0, buf.Length);
if (r > 0)
@@ -540,20 +539,6 @@ namespace Duplicati.Library.SharpExpect
m_event.Set();
}
}
if (m_process.HasExited)
{
//After the process exists, try one last time
//This protects against races with the reader and the process
if (!lastRun)
{
System.Threading.Thread.Sleep(100);
lastRun = true;
}
else
break; //Exit while loop
}
}
}
catch
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.237
// Runtime Version:4.0.30319.235
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -452,7 +452,7 @@ namespace Duplicati.Library.Backend.Strings {
/// <summary>
/// Looks up a localized string similar to Failed to start the SSH application ({0}).
///Make sure that &quot;putty&quot; is installed, and you have set the correct path.
///Make sure that &quot;PuTTY&quot; is installed, and you have set the correct path.
///Error message: {1}.
/// </summary>
internal static string LaunchErrorWindows {
@@ -245,7 +245,7 @@ Error message: {1}</value>
</data>
<data name="LaunchErrorWindows" xml:space="preserve">
<value>Failed to start the SSH application ({0}).
Make sure that "putty" is installed, and you have set the correct path.
Make sure that "PuTTY" is installed, and you have set the correct path.
Error message: {1}</value>
</data>
<data name="PasswordMissingError" xml:space="preserve">
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.237
// Runtime Version:4.0.30319.235
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -70,7 +70,7 @@ namespace Duplicati.Library.Backend.Strings {
}
/// <summary>
/// Looks up a localized string similar to SSH Settings.
/// Looks up a localized string similar to SSH.
/// </summary>
internal static string PageTitle {
get {
@@ -121,6 +121,6 @@
<value>Settings for the SSH backend</value>
</data>
<data name="PageTitle" xml:space="preserve">
<value>SSH Settings</value>
<value>SSH</value>
</data>
</root>
</root>
@@ -11,7 +11,7 @@
<RootNamespace>Duplicati.Library.Backend</RootNamespace>
<AssemblyName>Duplicati.Library.Backend.SkyDrive</AssemblyName>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>Duplicati.snk</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyFile>Duplicati.snk</AssemblyOriginatorKeyFile>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
@@ -62,6 +62,11 @@
<DesignTime>True</DesignTime>
<DependentUpon>SkyDrive.resx</DependentUpon>
</Compile>
<Compile Include="Strings\SkyDriveSession.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>SkyDriveSession.resx</DependentUpon>
</Compile>
<Compile Include="Strings\SkyDriveUI.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
@@ -91,6 +96,10 @@
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>SkyDrive.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Strings\SkyDriveSession.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>SkyDriveSession.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Strings\SkyDriveUI.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>SkyDriveUI.Designer.cs</LastGenOutput>
@@ -117,10 +117,10 @@ namespace Duplicati.Library.Backend
{
get {
return new List<ICommandLineArgument>(new ICommandLineArgument[] {
new CommandLineArgument("ftp-password", CommandLineArgument.ArgumentType.String, Strings.SkyDrive.DescriptionFTPPasswordShort, Strings.SkyDrive.DescriptionFTPPasswordLong),
new CommandLineArgument("ftp-password", CommandLineArgument.ArgumentType.Password, Strings.SkyDrive.DescriptionFTPPasswordShort, Strings.SkyDrive.DescriptionFTPPasswordLong),
new CommandLineArgument("ftp-username", CommandLineArgument.ArgumentType.String, Strings.SkyDrive.DescriptionFTPUsernameShort, Strings.SkyDrive.DescriptionFTPUsernameLong),
new CommandLineArgument(USERNAME_OPTION, CommandLineArgument.ArgumentType.String, Strings.SkyDrive.DescriptionPassportPasswordShort, Strings.SkyDrive.DescriptionPassportPasswordLong, null, new string[] {"ftp-password"}),
new CommandLineArgument(PASSWORD_OPTION, CommandLineArgument.ArgumentType.String, Strings.SkyDrive.DescriptionPassportUsernameShort, Strings.SkyDrive.DescriptionPassportUsernameLong, null, new string[] {"ftp-username"}),
new CommandLineArgument(PASSWORD_OPTION, CommandLineArgument.ArgumentType.Password, Strings.SkyDrive.DescriptionPassportUsernameShort, Strings.SkyDrive.DescriptionPassportUsernameLong, null, new string[] {"ftp-username"}),
});
}
}
File diff suppressed because it is too large Load Diff
@@ -16,8 +16,12 @@ namespace Duplicati.Library.Backend
private const string HAS_TESTED = "UI: Has tested";
private const string INITIALPASSWORD = "UI: Temp password";
private const string HAS_WARNED_LONG_PASSWORD = "UI: Warned long password";
private const string HAS_WARNED_PASSWORD_CHARS = "UI: Warned password chars";
private bool m_hasTested;
private bool m_hasWarnedPasswordChars;
private bool m_hasWarnedLongPassword;
private const string DUPLICATI_ACTION_MARKER = "*duplicati-action*";
private string m_uiAction = null;
@@ -83,6 +87,12 @@ namespace Duplicati.Library.Backend
if (!m_options.ContainsKey(HAS_TESTED) || !bool.TryParse(m_options[HAS_TESTED], out m_hasTested))
m_hasTested = false;
if (!m_options.ContainsKey(HAS_WARNED_LONG_PASSWORD) || !bool.TryParse(m_options[HAS_WARNED_LONG_PASSWORD], out m_hasWarnedLongPassword))
m_hasWarnedLongPassword = false;
if (!m_options.ContainsKey(HAS_WARNED_PASSWORD_CHARS) || !bool.TryParse(m_options[HAS_WARNED_PASSWORD_CHARS], out m_hasWarnedPasswordChars))
m_hasWarnedPasswordChars = false;
m_options.TryGetValue(DUPLICATI_ACTION_MARKER, out m_uiAction);
}
@@ -116,6 +126,32 @@ namespace Duplicati.Library.Backend
return false;
}
if (!m_hasWarnedLongPassword && SkyDriveSession.IsPasswordTooLong(Password.Text))
{
if (MessageBox.Show(this, Strings.SkyDriveUI.LongPasswordWarning, Application.ProductName, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning) != DialogResult.Yes)
{
try { Password.Focus(); }
catch { }
return false;
}
m_hasWarnedLongPassword = true;
}
if (!m_hasWarnedPasswordChars && SkyDriveSession.HasInvalidChars(Password.Text))
{
if (MessageBox.Show(this, Strings.SkyDriveUI.PasswordCharactersWarning, Application.ProductName, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning) != DialogResult.Yes)
{
try { Password.Focus(); }
catch { }
return false;
}
m_hasWarnedPasswordChars = true;
}
return true;
}
@@ -126,6 +162,8 @@ namespace Duplicati.Library.Backend
m_options.Clear();
m_options[HAS_TESTED] = m_hasTested.ToString();
m_options[HAS_WARNED_LONG_PASSWORD] = m_hasWarnedLongPassword.ToString();
m_options[HAS_WARNED_PASSWORD_CHARS] = m_hasWarnedPasswordChars.ToString();
m_options[FOLDER] = Path.Text;
m_options[USERNAME] = Username.Text;
m_options[PASSWORD] = Password.Text;
@@ -208,6 +246,8 @@ namespace Duplicati.Library.Backend
private void Password_TextChanged(object sender, EventArgs e)
{
m_hasTested = false;
m_hasWarnedLongPassword = false;
m_hasWarnedPasswordChars = false;
}
private void Path_TextChanged(object sender, EventArgs e)
@@ -0,0 +1,90 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.269
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Duplicati.Library.Backend.Strings {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class SkyDriveSession {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal SkyDriveSession() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Duplicati.Library.Backend.Strings.SkyDriveSession", typeof(SkyDriveSession).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized string similar to Login failed, check your username and password. Consider using a password with only alphanumeric characters..
/// </summary>
internal static string InvalidPasswordInvalidCharsFound {
get {
return ResourceManager.GetString("InvalidPasswordInvalidCharsFound", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Login failed, check your username and password. Consider using a password with less than 16 characters..
/// </summary>
internal static string InvalidPasswordLongPasswordFound {
get {
return ResourceManager.GetString("InvalidPasswordLongPasswordFound", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Login failed, check your username and password..
/// </summary>
internal static string InvalidUsernameOrPassword {
get {
return ResourceManager.GetString("InvalidUsernameOrPassword", resourceCulture);
}
}
}
}
@@ -0,0 +1,129 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="InvalidPasswordInvalidCharsFound" xml:space="preserve">
<value>Login failed, check your username and password. Consider using a password with only alphanumeric characters.</value>
</data>
<data name="InvalidPasswordLongPasswordFound" xml:space="preserve">
<value>Login failed, check your username and password. Consider using a password with less than 16 characters.</value>
</data>
<data name="InvalidUsernameOrPassword" xml:space="preserve">
<value>Login failed, check your username and password.</value>
</data>
</root>
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.237
// Runtime Version:4.0.30319.269
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -78,6 +78,17 @@ namespace Duplicati.Library.Backend.Strings {
}
}
/// <summary>
/// Looks up a localized string similar to Your password is more than 16 characters. SkyDrive may have unexpected issues, consider changing the password.
///
///Do you want to continue with the current password?.
/// </summary>
internal static string LongPasswordWarning {
get {
return ResourceManager.GetString("LongPasswordWarning", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to On this page you can select where to store the backup data..
/// </summary>
@@ -95,5 +106,16 @@ namespace Duplicati.Library.Backend.Strings {
return ResourceManager.GetString("PageTitle", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Your password contains characters that are not alphanumeric. SkyDrive may have unexpected issues, consider changing the password.
///
///Do you want to continue with the current password?.
/// </summary>
internal static string PasswordCharactersWarning {
get {
return ResourceManager.GetString("PasswordCharactersWarning", resourceCulture);
}
}
}
}
@@ -123,10 +123,20 @@
<data name="EmptyFolderPathError" xml:space="preserve">
<value>You must enter a folder to store the backup in</value>
</data>
<data name="LongPasswordWarning" xml:space="preserve">
<value>Your password is more than 16 characters. SkyDrive may have unexpected issues, consider changing the password.
Do you want to continue with the current password?</value>
</data>
<data name="PageDescription" xml:space="preserve">
<value>On this page you can select where to store the backup data.</value>
</data>
<data name="PageTitle" xml:space="preserve">
<value>Backup storage options</value>
</data>
<data name="PasswordCharactersWarning" xml:space="preserve">
<value>Your password contains characters that are not alphanumeric. SkyDrive may have unexpected issues, consider changing the password.
Do you want to continue with the current password?</value>
</data>
</root>
@@ -26,11 +26,6 @@ namespace Duplicati.Library.Backend
{
public class TahoeBackend : IBackend_v2, IStreamingBackend, IBackendGUI
{
/// <summary>
/// This is the time offset for all timestamps (unix style)
/// </summary>
private static readonly DateTime EPOCH = new DateTime(1970, 1, 1, 0, 0, 0);
private string m_url;
private bool m_useSSL = false;
@@ -170,7 +165,7 @@ namespace Duplicati.Library.Backend
if (fentry.IsObject && ((System.Collections.IDictionary)fentry).Contains("linkmotime"))
{
try { fe.LastModification = ((DateTime)(EPOCH + TimeSpan.FromSeconds((double)fentry["linkmotime"])).ToLocalTime()); }
try { fe.LastModification = ((DateTime)(Library.Utility.Utility.EPOCH + TimeSpan.FromSeconds((double)fentry["linkmotime"])).ToLocalTime()); }
catch { }
}
}
+187 -187
View File
@@ -1,187 +1,187 @@
namespace Duplicati.Library.Backend
{
partial class TahoeUI
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TahoeUI));
this.TestConnection = new System.Windows.Forms.Button();
this.Port = new System.Windows.Forms.NumericUpDown();
this.label1 = new System.Windows.Forms.Label();
this.Path = new System.Windows.Forms.TextBox();
this.Servername = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.CreateFolderButton = new System.Windows.Forms.Button();
this.UseSSL = new System.Windows.Forms.CheckBox();
this.AcceptAnyHash = new System.Windows.Forms.CheckBox();
this.AcceptSpecifiedHash = new System.Windows.Forms.CheckBox();
this.SpecifiedHash = new System.Windows.Forms.TextBox();
this.SSLGroup = new System.Windows.Forms.GroupBox();
((System.ComponentModel.ISupportInitialize)(this.Port)).BeginInit();
this.SSLGroup.SuspendLayout();
this.SuspendLayout();
//
// TestConnection
//
resources.ApplyResources(this.TestConnection, "TestConnection");
this.TestConnection.Name = "TestConnection";
this.TestConnection.UseVisualStyleBackColor = true;
this.TestConnection.Click += new System.EventHandler(this.TestConnection_Click);
//
// Port
//
resources.ApplyResources(this.Port, "Port");
this.Port.Maximum = new decimal(new int[] {
65500,
0,
0,
0});
this.Port.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.Port.Name = "Port";
this.Port.Value = new decimal(new int[] {
3456,
0,
0,
0});
this.Port.ValueChanged += new System.EventHandler(this.Port_ValueChanged);
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// Path
//
resources.ApplyResources(this.Path, "Path");
this.Path.Name = "Path";
this.Path.TextChanged += new System.EventHandler(this.Path_TextChanged);
//
// Servername
//
resources.ApplyResources(this.Servername, "Servername");
this.Servername.Name = "Servername";
this.Servername.TextChanged += new System.EventHandler(this.Servername_TextChanged);
//
// label5
//
resources.ApplyResources(this.label5, "label5");
this.label5.Name = "label5";
//
// label2
//
resources.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
//
// CreateFolderButton
//
resources.ApplyResources(this.CreateFolderButton, "CreateFolderButton");
this.CreateFolderButton.Name = "CreateFolderButton";
this.CreateFolderButton.UseVisualStyleBackColor = true;
this.CreateFolderButton.Click += new System.EventHandler(this.CreateFolderButton_Click);
//
// UseSSL
//
resources.ApplyResources(this.UseSSL, "UseSSL");
this.UseSSL.Name = "UseSSL";
this.UseSSL.UseVisualStyleBackColor = true;
this.UseSSL.CheckedChanged += new System.EventHandler(this.UseSSL_CheckedChanged);
//
// AcceptAnyHash
//
resources.ApplyResources(this.AcceptAnyHash, "AcceptAnyHash");
this.AcceptAnyHash.Name = "AcceptAnyHash";
this.AcceptAnyHash.UseVisualStyleBackColor = true;
this.AcceptAnyHash.CheckedChanged += new System.EventHandler(this.AcceptAnyHash_CheckedChanged);
//
// AcceptSpecifiedHash
//
resources.ApplyResources(this.AcceptSpecifiedHash, "AcceptSpecifiedHash");
this.AcceptSpecifiedHash.Name = "AcceptSpecifiedHash";
this.AcceptSpecifiedHash.UseVisualStyleBackColor = true;
this.AcceptSpecifiedHash.CheckedChanged += new System.EventHandler(this.AcceptSpecifiedHash_CheckedChanged);
//
// SpecifiedHash
//
resources.ApplyResources(this.SpecifiedHash, "SpecifiedHash");
this.SpecifiedHash.Name = "SpecifiedHash";
this.SpecifiedHash.TextChanged += new System.EventHandler(this.SpecifiedHash_TextChanged);
//
// SSLGroup
//
this.SSLGroup.Controls.Add(this.AcceptSpecifiedHash);
this.SSLGroup.Controls.Add(this.SpecifiedHash);
this.SSLGroup.Controls.Add(this.AcceptAnyHash);
resources.ApplyResources(this.SSLGroup, "SSLGroup");
this.SSLGroup.Name = "SSLGroup";
this.SSLGroup.TabStop = false;
//
// TahoeUI
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.UseSSL);
this.Controls.Add(this.SSLGroup);
this.Controls.Add(this.CreateFolderButton);
this.Controls.Add(this.TestConnection);
this.Controls.Add(this.Port);
this.Controls.Add(this.label1);
this.Controls.Add(this.Path);
this.Controls.Add(this.Servername);
this.Controls.Add(this.label5);
this.Controls.Add(this.label2);
this.Name = "TahoeUI";
this.Load += new System.EventHandler(this.TahoeUI_PageLoad);
((System.ComponentModel.ISupportInitialize)(this.Port)).EndInit();
this.SSLGroup.ResumeLayout(false);
this.SSLGroup.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button TestConnection;
private System.Windows.Forms.NumericUpDown Port;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox Path;
private System.Windows.Forms.TextBox Servername;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button CreateFolderButton;
private System.Windows.Forms.CheckBox UseSSL;
private System.Windows.Forms.CheckBox AcceptAnyHash;
private System.Windows.Forms.CheckBox AcceptSpecifiedHash;
private System.Windows.Forms.TextBox SpecifiedHash;
private System.Windows.Forms.GroupBox SSLGroup;
}
}
namespace Duplicati.Library.Backend
{
partial class TahoeUI
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TahoeUI));
this.TestConnection = new System.Windows.Forms.Button();
this.Port = new System.Windows.Forms.NumericUpDown();
this.label1 = new System.Windows.Forms.Label();
this.Path = new System.Windows.Forms.TextBox();
this.Servername = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.CreateFolderButton = new System.Windows.Forms.Button();
this.UseSSL = new System.Windows.Forms.CheckBox();
this.AcceptAnyHash = new System.Windows.Forms.CheckBox();
this.AcceptSpecifiedHash = new System.Windows.Forms.CheckBox();
this.SpecifiedHash = new System.Windows.Forms.TextBox();
this.SSLGroup = new System.Windows.Forms.GroupBox();
((System.ComponentModel.ISupportInitialize)(this.Port)).BeginInit();
this.SSLGroup.SuspendLayout();
this.SuspendLayout();
//
// TestConnection
//
resources.ApplyResources(this.TestConnection, "TestConnection");
this.TestConnection.Name = "TestConnection";
this.TestConnection.UseVisualStyleBackColor = true;
this.TestConnection.Click += new System.EventHandler(this.TestConnection_Click);
//
// Port
//
resources.ApplyResources(this.Port, "Port");
this.Port.Maximum = new decimal(new int[] {
65535,
0,
0,
0});
this.Port.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.Port.Name = "Port";
this.Port.Value = new decimal(new int[] {
3456,
0,
0,
0});
this.Port.ValueChanged += new System.EventHandler(this.Port_ValueChanged);
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// Path
//
resources.ApplyResources(this.Path, "Path");
this.Path.Name = "Path";
this.Path.TextChanged += new System.EventHandler(this.Path_TextChanged);
//
// Servername
//
resources.ApplyResources(this.Servername, "Servername");
this.Servername.Name = "Servername";
this.Servername.TextChanged += new System.EventHandler(this.Servername_TextChanged);
//
// label5
//
resources.ApplyResources(this.label5, "label5");
this.label5.Name = "label5";
//
// label2
//
resources.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
//
// CreateFolderButton
//
resources.ApplyResources(this.CreateFolderButton, "CreateFolderButton");
this.CreateFolderButton.Name = "CreateFolderButton";
this.CreateFolderButton.UseVisualStyleBackColor = true;
this.CreateFolderButton.Click += new System.EventHandler(this.CreateFolderButton_Click);
//
// UseSSL
//
resources.ApplyResources(this.UseSSL, "UseSSL");
this.UseSSL.Name = "UseSSL";
this.UseSSL.UseVisualStyleBackColor = true;
this.UseSSL.CheckedChanged += new System.EventHandler(this.UseSSL_CheckedChanged);
//
// AcceptAnyHash
//
resources.ApplyResources(this.AcceptAnyHash, "AcceptAnyHash");
this.AcceptAnyHash.Name = "AcceptAnyHash";
this.AcceptAnyHash.UseVisualStyleBackColor = true;
this.AcceptAnyHash.CheckedChanged += new System.EventHandler(this.AcceptAnyHash_CheckedChanged);
//
// AcceptSpecifiedHash
//
resources.ApplyResources(this.AcceptSpecifiedHash, "AcceptSpecifiedHash");
this.AcceptSpecifiedHash.Name = "AcceptSpecifiedHash";
this.AcceptSpecifiedHash.UseVisualStyleBackColor = true;
this.AcceptSpecifiedHash.CheckedChanged += new System.EventHandler(this.AcceptSpecifiedHash_CheckedChanged);
//
// SpecifiedHash
//
resources.ApplyResources(this.SpecifiedHash, "SpecifiedHash");
this.SpecifiedHash.Name = "SpecifiedHash";
this.SpecifiedHash.TextChanged += new System.EventHandler(this.SpecifiedHash_TextChanged);
//
// SSLGroup
//
this.SSLGroup.Controls.Add(this.AcceptSpecifiedHash);
this.SSLGroup.Controls.Add(this.SpecifiedHash);
this.SSLGroup.Controls.Add(this.AcceptAnyHash);
resources.ApplyResources(this.SSLGroup, "SSLGroup");
this.SSLGroup.Name = "SSLGroup";
this.SSLGroup.TabStop = false;
//
// TahoeUI
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.UseSSL);
this.Controls.Add(this.SSLGroup);
this.Controls.Add(this.CreateFolderButton);
this.Controls.Add(this.TestConnection);
this.Controls.Add(this.Port);
this.Controls.Add(this.label1);
this.Controls.Add(this.Path);
this.Controls.Add(this.Servername);
this.Controls.Add(this.label5);
this.Controls.Add(this.label2);
this.Name = "TahoeUI";
this.Load += new System.EventHandler(this.TahoeUI_PageLoad);
((System.ComponentModel.ISupportInitialize)(this.Port)).EndInit();
this.SSLGroup.ResumeLayout(false);
this.SSLGroup.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button TestConnection;
private System.Windows.Forms.NumericUpDown Port;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox Path;
private System.Windows.Forms.TextBox Servername;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button CreateFolderButton;
private System.Windows.Forms.CheckBox UseSSL;
private System.Windows.Forms.CheckBox AcceptAnyHash;
private System.Windows.Forms.CheckBox AcceptSpecifiedHash;
private System.Windows.Forms.TextBox SpecifiedHash;
private System.Windows.Forms.GroupBox SSLGroup;
}
}
+6 -3
View File
@@ -265,7 +265,7 @@ namespace Duplicati.Library.Backend
get
{
return new List<ICommandLineArgument>(new ICommandLineArgument[] {
new CommandLineArgument("ftp-password", CommandLineArgument.ArgumentType.String, Strings.WEBDAV.DescriptionFTPPasswordShort, Strings.WEBDAV.DescriptionFTPPasswordLong),
new CommandLineArgument("ftp-password", CommandLineArgument.ArgumentType.Password, Strings.WEBDAV.DescriptionFTPPasswordShort, Strings.WEBDAV.DescriptionFTPPasswordLong),
new CommandLineArgument("ftp-username", CommandLineArgument.ArgumentType.String, Strings.WEBDAV.DescriptionFTPUsernameShort, Strings.WEBDAV.DescriptionFTPUsernameLong),
new CommandLineArgument("integrated-authentication", CommandLineArgument.ArgumentType.Boolean, Strings.WEBDAV.DescriptionIntegratedAuthenticationShort, Strings.WEBDAV.DescriptionIntegratedAuthenticationLong),
new CommandLineArgument("force-digest-authentication", CommandLineArgument.ArgumentType.Boolean, Strings.WEBDAV.DescriptionForceDigestShort, Strings.WEBDAV.DescriptionForceDigestLong),
@@ -316,7 +316,9 @@ namespace Duplicati.Library.Backend
{
System.Net.HttpWebRequest req = (System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create(m_url + System.Web.HttpUtility.UrlEncode(remotename).Replace("+", "%20"));
if (m_useIntegratedAuthentication)
{
req.UseDefaultCredentials = true;
}
else if (m_forceDigestAuthentication)
{
System.Net.CredentialCache cred = new System.Net.CredentialCache();
@@ -326,8 +328,9 @@ namespace Duplicati.Library.Backend
else
{
req.Credentials = m_userInfo;
if (Library.Utility.Utility.IsClientLinux)
req.PreAuthenticate = true; //We need this under Mono for some reason
//We need this under Mono for some reason,
// and it appears some servers require this as well
req.PreAuthenticate = true;
}
req.KeepAlive = false;
+257 -257
View File
@@ -1,257 +1,257 @@
namespace Duplicati.Library.Backend
{
partial class WebDAVUI
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WebDAVUI));
this.UseIntegratedAuth = new System.Windows.Forms.CheckBox();
this.TestConnection = new System.Windows.Forms.Button();
this.Username = new System.Windows.Forms.TextBox();
this.Port = new System.Windows.Forms.NumericUpDown();
this.label1 = new System.Windows.Forms.Label();
this.Path = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.Servername = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.PasswordSettings = new System.Windows.Forms.GroupBox();
this.Password = new Duplicati.Winforms.Controls.PasswordControl();
this.CreateFolderButton = new System.Windows.Forms.Button();
this.DigestAuth = new System.Windows.Forms.CheckBox();
this.UseSSL = new System.Windows.Forms.CheckBox();
this.AcceptAnyHash = new System.Windows.Forms.CheckBox();
this.AcceptSpecifiedHash = new System.Windows.Forms.CheckBox();
this.SpecifiedHash = new System.Windows.Forms.TextBox();
this.SSLGroup = new System.Windows.Forms.GroupBox();
((System.ComponentModel.ISupportInitialize)(this.Port)).BeginInit();
this.PasswordSettings.SuspendLayout();
this.SSLGroup.SuspendLayout();
this.SuspendLayout();
//
// UseIntegratedAuth
//
resources.ApplyResources(this.UseIntegratedAuth, "UseIntegratedAuth");
this.UseIntegratedAuth.Name = "UseIntegratedAuth";
this.UseIntegratedAuth.UseVisualStyleBackColor = true;
this.UseIntegratedAuth.CheckedChanged += new System.EventHandler(this.UseIntegratedAuth_CheckedChanged);
//
// TestConnection
//
resources.ApplyResources(this.TestConnection, "TestConnection");
this.TestConnection.Name = "TestConnection";
this.TestConnection.UseVisualStyleBackColor = true;
this.TestConnection.Click += new System.EventHandler(this.TestConnection_Click);
//
// Username
//
resources.ApplyResources(this.Username, "Username");
this.Username.Name = "Username";
this.Username.TextChanged += new System.EventHandler(this.Username_TextChanged);
//
// Port
//
resources.ApplyResources(this.Port, "Port");
this.Port.Maximum = new decimal(new int[] {
65500,
0,
0,
0});
this.Port.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.Port.Name = "Port";
this.Port.Value = new decimal(new int[] {
80,
0,
0,
0});
this.Port.ValueChanged += new System.EventHandler(this.Port_ValueChanged);
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// Path
//
resources.ApplyResources(this.Path, "Path");
this.Path.Name = "Path";
this.Path.TextChanged += new System.EventHandler(this.Path_TextChanged);
//
// label4
//
resources.ApplyResources(this.label4, "label4");
this.label4.Name = "label4";
//
// Servername
//
resources.ApplyResources(this.Servername, "Servername");
this.Servername.Name = "Servername";
this.Servername.TextChanged += new System.EventHandler(this.Servername_TextChanged);
//
// label3
//
resources.ApplyResources(this.label3, "label3");
this.label3.Name = "label3";
//
// label5
//
resources.ApplyResources(this.label5, "label5");
this.label5.Name = "label5";
//
// label2
//
resources.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
//
// PasswordSettings
//
this.PasswordSettings.Controls.Add(this.Username);
this.PasswordSettings.Controls.Add(this.Password);
this.PasswordSettings.Controls.Add(this.label4);
this.PasswordSettings.Controls.Add(this.label3);
resources.ApplyResources(this.PasswordSettings, "PasswordSettings");
this.PasswordSettings.Name = "PasswordSettings";
this.PasswordSettings.TabStop = false;
//
// Password
//
this.Password.AskToEnterNewPassword = false;
this.Password.IsPasswordVisible = false;
resources.ApplyResources(this.Password, "Password");
this.Password.MaximumSize = new System.Drawing.Size(5000, 20);
this.Password.MinimumSize = new System.Drawing.Size(150, 20);
this.Password.Name = "Password";
this.Password.TextChanged += new System.EventHandler(this.Password_TextChanged);
//
// CreateFolderButton
//
resources.ApplyResources(this.CreateFolderButton, "CreateFolderButton");
this.CreateFolderButton.Name = "CreateFolderButton";
this.CreateFolderButton.UseVisualStyleBackColor = true;
this.CreateFolderButton.Click += new System.EventHandler(this.CreateFolderButton_Click);
//
// DigestAuth
//
resources.ApplyResources(this.DigestAuth, "DigestAuth");
this.DigestAuth.Name = "DigestAuth";
this.DigestAuth.UseVisualStyleBackColor = true;
this.DigestAuth.CheckedChanged += new System.EventHandler(this.DigestAuth_CheckedChanged);
//
// UseSSL
//
resources.ApplyResources(this.UseSSL, "UseSSL");
this.UseSSL.Name = "UseSSL";
this.UseSSL.UseVisualStyleBackColor = true;
this.UseSSL.CheckedChanged += new System.EventHandler(this.UseSSL_CheckedChanged);
//
// AcceptAnyHash
//
resources.ApplyResources(this.AcceptAnyHash, "AcceptAnyHash");
this.AcceptAnyHash.Name = "AcceptAnyHash";
this.AcceptAnyHash.UseVisualStyleBackColor = true;
this.AcceptAnyHash.CheckedChanged += new System.EventHandler(this.AcceptAnyHash_CheckedChanged);
//
// AcceptSpecifiedHash
//
resources.ApplyResources(this.AcceptSpecifiedHash, "AcceptSpecifiedHash");
this.AcceptSpecifiedHash.Name = "AcceptSpecifiedHash";
this.AcceptSpecifiedHash.UseVisualStyleBackColor = true;
this.AcceptSpecifiedHash.CheckedChanged += new System.EventHandler(this.AcceptSpecifiedHash_CheckedChanged);
//
// SpecifiedHash
//
resources.ApplyResources(this.SpecifiedHash, "SpecifiedHash");
this.SpecifiedHash.Name = "SpecifiedHash";
this.SpecifiedHash.TextChanged += new System.EventHandler(this.SpecifiedHash_TextChanged);
//
// SSLGroup
//
this.SSLGroup.Controls.Add(this.AcceptSpecifiedHash);
this.SSLGroup.Controls.Add(this.SpecifiedHash);
this.SSLGroup.Controls.Add(this.AcceptAnyHash);
resources.ApplyResources(this.SSLGroup, "SSLGroup");
this.SSLGroup.Name = "SSLGroup";
this.SSLGroup.TabStop = false;
//
// WebDAVUI
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.UseSSL);
this.Controls.Add(this.SSLGroup);
this.Controls.Add(this.DigestAuth);
this.Controls.Add(this.CreateFolderButton);
this.Controls.Add(this.UseIntegratedAuth);
this.Controls.Add(this.TestConnection);
this.Controls.Add(this.Port);
this.Controls.Add(this.label1);
this.Controls.Add(this.Path);
this.Controls.Add(this.Servername);
this.Controls.Add(this.label5);
this.Controls.Add(this.label2);
this.Controls.Add(this.PasswordSettings);
this.Name = "WebDAVUI";
this.Load += new System.EventHandler(this.WebDAVUI_PageLoad);
((System.ComponentModel.ISupportInitialize)(this.Port)).EndInit();
this.PasswordSettings.ResumeLayout(false);
this.PasswordSettings.PerformLayout();
this.SSLGroup.ResumeLayout(false);
this.SSLGroup.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.CheckBox UseIntegratedAuth;
private System.Windows.Forms.Button TestConnection;
private System.Windows.Forms.TextBox Username;
private System.Windows.Forms.NumericUpDown Port;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox Path;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox Servername;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.GroupBox PasswordSettings;
private Duplicati.Winforms.Controls.PasswordControl Password;
private System.Windows.Forms.Button CreateFolderButton;
private System.Windows.Forms.CheckBox DigestAuth;
private System.Windows.Forms.CheckBox UseSSL;
private System.Windows.Forms.CheckBox AcceptAnyHash;
private System.Windows.Forms.CheckBox AcceptSpecifiedHash;
private System.Windows.Forms.TextBox SpecifiedHash;
private System.Windows.Forms.GroupBox SSLGroup;
}
}
namespace Duplicati.Library.Backend
{
partial class WebDAVUI
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WebDAVUI));
this.UseIntegratedAuth = new System.Windows.Forms.CheckBox();
this.TestConnection = new System.Windows.Forms.Button();
this.Username = new System.Windows.Forms.TextBox();
this.Port = new System.Windows.Forms.NumericUpDown();
this.label1 = new System.Windows.Forms.Label();
this.Path = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.Servername = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.PasswordSettings = new System.Windows.Forms.GroupBox();
this.Password = new Duplicati.Winforms.Controls.PasswordControl();
this.CreateFolderButton = new System.Windows.Forms.Button();
this.DigestAuth = new System.Windows.Forms.CheckBox();
this.UseSSL = new System.Windows.Forms.CheckBox();
this.AcceptAnyHash = new System.Windows.Forms.CheckBox();
this.AcceptSpecifiedHash = new System.Windows.Forms.CheckBox();
this.SpecifiedHash = new System.Windows.Forms.TextBox();
this.SSLGroup = new System.Windows.Forms.GroupBox();
((System.ComponentModel.ISupportInitialize)(this.Port)).BeginInit();
this.PasswordSettings.SuspendLayout();
this.SSLGroup.SuspendLayout();
this.SuspendLayout();
//
// UseIntegratedAuth
//
resources.ApplyResources(this.UseIntegratedAuth, "UseIntegratedAuth");
this.UseIntegratedAuth.Name = "UseIntegratedAuth";
this.UseIntegratedAuth.UseVisualStyleBackColor = true;
this.UseIntegratedAuth.CheckedChanged += new System.EventHandler(this.UseIntegratedAuth_CheckedChanged);
//
// TestConnection
//
resources.ApplyResources(this.TestConnection, "TestConnection");
this.TestConnection.Name = "TestConnection";
this.TestConnection.UseVisualStyleBackColor = true;
this.TestConnection.Click += new System.EventHandler(this.TestConnection_Click);
//
// Username
//
resources.ApplyResources(this.Username, "Username");
this.Username.Name = "Username";
this.Username.TextChanged += new System.EventHandler(this.Username_TextChanged);
//
// Port
//
resources.ApplyResources(this.Port, "Port");
this.Port.Maximum = new decimal(new int[] {
65535,
0,
0,
0});
this.Port.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.Port.Name = "Port";
this.Port.Value = new decimal(new int[] {
80,
0,
0,
0});
this.Port.ValueChanged += new System.EventHandler(this.Port_ValueChanged);
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// Path
//
resources.ApplyResources(this.Path, "Path");
this.Path.Name = "Path";
this.Path.TextChanged += new System.EventHandler(this.Path_TextChanged);
//
// label4
//
resources.ApplyResources(this.label4, "label4");
this.label4.Name = "label4";
//
// Servername
//
resources.ApplyResources(this.Servername, "Servername");
this.Servername.Name = "Servername";
this.Servername.TextChanged += new System.EventHandler(this.Servername_TextChanged);
//
// label3
//
resources.ApplyResources(this.label3, "label3");
this.label3.Name = "label3";
//
// label5
//
resources.ApplyResources(this.label5, "label5");
this.label5.Name = "label5";
//
// label2
//
resources.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
//
// PasswordSettings
//
this.PasswordSettings.Controls.Add(this.Username);
this.PasswordSettings.Controls.Add(this.Password);
this.PasswordSettings.Controls.Add(this.label4);
this.PasswordSettings.Controls.Add(this.label3);
resources.ApplyResources(this.PasswordSettings, "PasswordSettings");
this.PasswordSettings.Name = "PasswordSettings";
this.PasswordSettings.TabStop = false;
//
// Password
//
this.Password.AskToEnterNewPassword = false;
this.Password.IsPasswordVisible = false;
resources.ApplyResources(this.Password, "Password");
this.Password.MaximumSize = new System.Drawing.Size(5000, 20);
this.Password.MinimumSize = new System.Drawing.Size(150, 20);
this.Password.Name = "Password";
this.Password.TextChanged += new System.EventHandler(this.Password_TextChanged);
//
// CreateFolderButton
//
resources.ApplyResources(this.CreateFolderButton, "CreateFolderButton");
this.CreateFolderButton.Name = "CreateFolderButton";
this.CreateFolderButton.UseVisualStyleBackColor = true;
this.CreateFolderButton.Click += new System.EventHandler(this.CreateFolderButton_Click);
//
// DigestAuth
//
resources.ApplyResources(this.DigestAuth, "DigestAuth");
this.DigestAuth.Name = "DigestAuth";
this.DigestAuth.UseVisualStyleBackColor = true;
this.DigestAuth.CheckedChanged += new System.EventHandler(this.DigestAuth_CheckedChanged);
//
// UseSSL
//
resources.ApplyResources(this.UseSSL, "UseSSL");
this.UseSSL.Name = "UseSSL";
this.UseSSL.UseVisualStyleBackColor = true;
this.UseSSL.CheckedChanged += new System.EventHandler(this.UseSSL_CheckedChanged);
//
// AcceptAnyHash
//
resources.ApplyResources(this.AcceptAnyHash, "AcceptAnyHash");
this.AcceptAnyHash.Name = "AcceptAnyHash";
this.AcceptAnyHash.UseVisualStyleBackColor = true;
this.AcceptAnyHash.CheckedChanged += new System.EventHandler(this.AcceptAnyHash_CheckedChanged);
//
// AcceptSpecifiedHash
//
resources.ApplyResources(this.AcceptSpecifiedHash, "AcceptSpecifiedHash");
this.AcceptSpecifiedHash.Name = "AcceptSpecifiedHash";
this.AcceptSpecifiedHash.UseVisualStyleBackColor = true;
this.AcceptSpecifiedHash.CheckedChanged += new System.EventHandler(this.AcceptSpecifiedHash_CheckedChanged);
//
// SpecifiedHash
//
resources.ApplyResources(this.SpecifiedHash, "SpecifiedHash");
this.SpecifiedHash.Name = "SpecifiedHash";
this.SpecifiedHash.TextChanged += new System.EventHandler(this.SpecifiedHash_TextChanged);
//
// SSLGroup
//
this.SSLGroup.Controls.Add(this.AcceptSpecifiedHash);
this.SSLGroup.Controls.Add(this.SpecifiedHash);
this.SSLGroup.Controls.Add(this.AcceptAnyHash);
resources.ApplyResources(this.SSLGroup, "SSLGroup");
this.SSLGroup.Name = "SSLGroup";
this.SSLGroup.TabStop = false;
//
// WebDAVUI
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.UseSSL);
this.Controls.Add(this.SSLGroup);
this.Controls.Add(this.DigestAuth);
this.Controls.Add(this.CreateFolderButton);
this.Controls.Add(this.UseIntegratedAuth);
this.Controls.Add(this.TestConnection);
this.Controls.Add(this.Port);
this.Controls.Add(this.label1);
this.Controls.Add(this.Path);
this.Controls.Add(this.Servername);
this.Controls.Add(this.label5);
this.Controls.Add(this.label2);
this.Controls.Add(this.PasswordSettings);
this.Name = "WebDAVUI";
this.Load += new System.EventHandler(this.WebDAVUI_PageLoad);
((System.ComponentModel.ISupportInitialize)(this.Port)).EndInit();
this.PasswordSettings.ResumeLayout(false);
this.PasswordSettings.PerformLayout();
this.SSLGroup.ResumeLayout(false);
this.SSLGroup.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.CheckBox UseIntegratedAuth;
private System.Windows.Forms.Button TestConnection;
private System.Windows.Forms.TextBox Username;
private System.Windows.Forms.NumericUpDown Port;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox Path;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox Servername;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.GroupBox PasswordSettings;
private Duplicati.Winforms.Controls.PasswordControl Password;
private System.Windows.Forms.Button CreateFolderButton;
private System.Windows.Forms.CheckBox DigestAuth;
private System.Windows.Forms.CheckBox UseSSL;
private System.Windows.Forms.CheckBox AcceptAnyHash;
private System.Windows.Forms.CheckBox AcceptSpecifiedHash;
private System.Windows.Forms.TextBox SpecifiedHash;
private System.Windows.Forms.GroupBox SSLGroup;
}
}
@@ -52,6 +52,15 @@ namespace Duplicati.Library.Compression
/// </summary>
private long m_headersize = 0;
/// <summary>
/// The encoding used for filenames.
/// Used to calculate the size of the Central Header.
/// </summary>
private static readonly Encoding _filenameEncoding = Encoding.UTF8;
//NOTE: We should use ICSharpCode.SharpZipLib.Zip.ZipConstants.DefaultCodePage),
// but since we set the bit flag Unicode, it becomes UTF-8 as defined in
// the Zip 6.3.0 format description, Appendix D - Language Encoding (EFS)
#if !SHARPZIPLIBWORKS
/// <summary>
/// We need an output stream because we cannot update an existing file
@@ -254,7 +263,7 @@ namespace Duplicati.Library.Compression
public string[] ReadAllLines(string file)
{
List<string> lines = new List<string>();
using (System.IO.StreamReader sr = new System.IO.StreamReader(OpenRead(file)))
using (System.IO.StreamReader sr = new System.IO.StreamReader(OpenRead(file), System.Text.Encoding.UTF8, true))
while (!sr.EndOfStream)
lines.Add(sr.ReadLine());
return lines.ToArray();
@@ -309,7 +318,7 @@ namespace Duplicati.Library.Compression
/// <param name="data">The lines to write</param>
public void WriteAllLines(string file, string[] data)
{
using (System.IO.StreamWriter sw = new System.IO.StreamWriter(CreateFile(file)))
using (System.IO.StreamWriter sw = new System.IO.StreamWriter(CreateFile(file), System.Text.Encoding.UTF8))
foreach (string s in data)
sw.WriteLine(s);
}
@@ -367,7 +376,7 @@ namespace Duplicati.Library.Compression
throw new Exception(Strings.FileArchiveZip.AttemptWriteWhileReadingError);
#endif
string entryname = PathFromFilesystem(file);
m_headersize += 46 + 24 + Encoding.GetEncoding(ICSharpCode.SharpZipLib.Zip.ZipConstants.DefaultCodePage).GetByteCount(entryname);
m_headersize += 46 + 24 + _filenameEncoding.GetByteCount(entryname);
#if SHARPZIPLIBWORKS
if (FileExists(file))
DeleteFile(file);
@@ -60,6 +60,11 @@ namespace Duplicati.Library.DynamicLoader
/// </summary>
public static IGenericModule[] Modules { get { return new GenericLoaderSub().Interfaces; } }
/// <summary>
/// Gets a list of keys supported
/// </summary>
public static string[] Keys { get { return new GenericLoaderSub().Keys; } }
#endregion
}
@@ -234,6 +234,8 @@ namespace Duplicati.Library.Encryption
public ProtectedCryptoStream(System.IO.Stream stream, Exception reportException, bool defaultFallback)
: base(stream)
{
m_reportException = reportException;
m_defaultFallback = defaultFallback;
}
/// <summary>
@@ -122,6 +122,7 @@
<ItemGroup>
<EmbeddedResource Include="GPGCommonOptions.resx">
<DependentUpon>GPGCommonOptions.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Strings\AESEncryption.resx">
<SubType>Designer</SubType>
@@ -145,6 +146,7 @@
<EmbeddedResource Include="Strings\GPGSettingsControl.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>GPGSettingsControl.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Strings\GPGStreamWrapper.resx">
<SubType>Designer</SubType>
@@ -70,7 +70,6 @@
this.Controls.Add(this.BrowseForGPGPathButton);
this.Controls.Add(this.GPGPath);
this.Controls.Add(this.label1);
this.MinimumSize = new System.Drawing.Size(283, 32);
this.Name = "GPGCommonOptions";
this.Load += new System.EventHandler(this.GPGCommonOptions_Load);
this.ResumeLayout(false);
@@ -123,16 +123,16 @@
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 8</value>
<value>8, 12</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>109, 13</value>
<value>57, 13</value>
</data>
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>GPG executable path</value>
<value>GPG path:</value>
</data>
<data name="&gt;&gt;label1.Name" xml:space="preserve">
<value>label1</value>
@@ -151,10 +151,10 @@
<value>Top, Left, Right</value>
</data>
<data name="GPGPath.Location" type="System.Drawing.Point, System.Drawing">
<value>120, 8</value>
<value>130, 9</value>
</data>
<data name="GPGPath.Size" type="System.Drawing.Size, System.Drawing">
<value>138, 21</value>
<value>279, 21</value>
</data>
<data name="GPGPath.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
@@ -175,7 +175,7 @@
<value>Top, Right</value>
</data>
<data name="BrowseForGPGPathButton.Location" type="System.Drawing.Point, System.Drawing">
<value>258, 8</value>
<value>415, 9</value>
</data>
<data name="BrowseForGPGPathButton.Size" type="System.Drawing.Size, System.Drawing">
<value>24, 20</value>
@@ -217,7 +217,7 @@
<value>True</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>283, 32</value>
<value>445, 283</value>
</data>
<data name="&gt;&gt;BrowseForGPGDialog.Name" xml:space="preserve">
<value>BrowseForGPGDialog</value>
@@ -60,12 +60,12 @@ namespace Duplicati.Library.Encryption
/// <summary>
/// Always present commandline options (--passphrase-fd 0)
/// </summary>
private const string GPG_COMMANDLINE_STANDARD_OPTIONS = "--passphrase-fd 0";
private const string GPG_COMMANDLINE_STANDARD_OPTIONS = "--batch --passphrase-fd 0";
/// <summary>
/// The options that are supplied as default when encrypting (--symmetric --local-user)
/// </summary>
private const string GPG_ENCRYPTION_DEFAULT_OPTIONS = "--symmetric --local-user";
private const string GPG_ENCRYPTION_DEFAULT_OPTIONS = "--batch --symmetric --local-user";
/// <summary>
/// The options that are supplied as default when encrypting (default is empty)
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.237
// Runtime Version:4.0.30319.235
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -97,7 +97,7 @@ namespace Duplicati.Library.Encryption.Strings {
}
/// <summary>
/// Looks up a localized string similar to AES-256 encryption, built in.
/// Looks up a localized string similar to AES-256 encryption, built-in.
/// </summary>
internal static string DisplayName {
get {
@@ -130,6 +130,6 @@
<value>This module encrypts all files in the same way that AESCrypt does, using 256 bit AES encryption.</value>
</data>
<data name="DisplayName" xml:space="preserve">
<value>AES-256 encryption, built in</value>
<value>AES-256 encryption, built-in</value>
</data>
</root>
</root>

Some files were not shown because too many files have changed in this diff Show More