Преглед изворни кода

added windows support without needing to supply --dir attribute

GrantBirki пре 4 година
родитељ
комит
a02f0891d4
1 измењених фајлова са 5 додато и 0 уклоњено
  1. 5 0
      tools/index.js

+ 5 - 0
tools/index.js

@@ -9,6 +9,11 @@ const os = require('os')
 // Backup source directory
 var backupDirectory = path.join(os.homedir(), '/Library/Application Support/MobileSync/Backup/')
 
+osType = process.platform
+if (osType === "win32") {
+  var backupDirectory = path.join(require('os').homedir(), '\\Apple\\MobileSync\\Backup')
+}
+
 // Object containing all report modules
 var moduleCache = report.types