directory-sync
Advanced tools
Comparing version 2.0.20 to 2.0.21
@@ -0,0 +0,0 @@ import Server from './src/components/Server.js'; |
{ | ||
"name": "directory-sync", | ||
"version": "2.0.20", | ||
"version": "2.0.21", | ||
"description": "Easily synchronize directories between two machines over the internet.", | ||
@@ -30,3 +30,3 @@ "main": "index.js", | ||
"chokidar": "^3.5.3", | ||
"hyper-express": "^6.8.4", | ||
"hyper-express": "^6.8.5", | ||
"just-queue": "^1.0.1", | ||
@@ -33,0 +33,0 @@ "node-fetch": "^3.2.0", |
@@ -0,0 +0,0 @@ # DirectorySync: Multi-Directional FileSystem Synchronization |
@@ -0,0 +0,0 @@ import tempDirectoryRaw from 'temp-dir'; |
@@ -0,0 +0,0 @@ import Path from 'path'; |
@@ -447,3 +447,11 @@ import fetch from 'node-fetch'; | ||
const [l_md5, l_cat, l_mat] = local_record; | ||
if (l_md5 !== r_md5) sync_direction = l_cat < r_cat || l_mat < r_mat ? -1 : 1; | ||
if (l_md5 !== r_md5) { | ||
// Give priority to the modified at timestamp if the MD5 hashes do not match | ||
// Fall back to created at timestamp if modified at timestamp is not available as it is less accurate but is a last resort | ||
if (l_mat && r_mat) { | ||
sync_direction = l_mat < r_mat ? -1 : 1; | ||
} else if (l_cat && r_cat) { | ||
sync_direction = l_cat < r_cat ? -1 : 1; | ||
} | ||
} | ||
} | ||
@@ -450,0 +458,0 @@ |
@@ -0,0 +0,0 @@ import Path from 'path'; |
@@ -0,0 +0,0 @@ import Crypto from 'crypto'; |
Sorry, the diff of this file is not supported yet
87201
1876
Updatedhyper-express@^6.8.5