-
Notifications
You must be signed in to change notification settings - Fork 0
Smart Routing
Windows filesystems enforce a legacy path length limitation of 260 characters (MAX_PATH). However, Android (Linux kernel) has no such limit. This creates a critical error when copying deeply nested Android folders to a Windows PC, leading to silent backup failures or file skipping.
Jigar Tools solves the MAX_PATH issue dynamically without requiring registry hacks or admin policy modifications:
graph TD
A[Start Sync / Restore] --> B[Find first unused drive letter from Z: backward]
B --> C[Map backup directory to virtual drive e.g. subst Z: path]
C --> D[Run sync operations using Z:/ as target root]
D --> E[Sync completes / aborts]
E --> F[Unmount virtual drive subst Z: /D]
At script execution, JigarSmartSync.ps1 checks for available drive letters going backwards from Z: to E:. Once an unused letter is found, it maps the path instantly:
subst Z: "D:\Backups\My_Extremely_Deep_Android_Backup_Folder_Here"The target root path is shortened from D:\Backups\My_Extremely_Deep_Android_Backup_Folder_Here\ to Z:\, saving up to 240+ characters of path length.
Windows Explorer often locks virtual drives if they are currently viewed. Jigar Tools runs a 5-iteration cleanup retry loop with a 200ms sleep window to wait for system hooks to clear before forcibly unmounting.
If a terminal is forcibly closed, the mapping may persist. On startup, Jigar Tools automatically queries active virtual drives using:
substIt cleans up any matching local backup directory drives left from previous sessions, maintaining a clean system workspace.