Cleaned up formatting

This commit is contained in:
amarcu5
2018-04-28 21:23:00 +01:00
parent 4c3d5dbc2f
commit 8a3c5847a8

View File

@@ -59,7 +59,6 @@ func DeleteShadowCopy() {
LOG_INFO("VSS_DELETE", "Shadow copy unmounted and deleted at %s", snapshotPath) LOG_INFO("VSS_DELETE", "Shadow copy unmounted and deleted at %s", snapshotPath)
snapshotPath = "" snapshotPath = ""
} }
func CreateShadowCopy(top string, shadowCopy bool, timeoutInSeconds int) (shadowTop string) { func CreateShadowCopy(top string, shadowCopy bool, timeoutInSeconds int) (shadowTop string) {
@@ -92,14 +91,13 @@ func CreateShadowCopy(top string, shadowCopy bool, timeoutInSeconds int) (shadow
} }
snapshotDate = strings.TrimSpace(tmutilOutput[colonPos+1:]) snapshotDate = strings.TrimSpace(tmutilOutput[colonPos+1:])
_, err = CommandWithTimeout(timeoutInSeconds, "mount", "-t", "apfs", "-o", "nobrowse,-s=com.apple.TimeMachine." + snapshotDate, "/", snapshotPath) _, err = CommandWithTimeout(timeoutInSeconds,
"mount", "-t", "apfs", "-o", "nobrowse,-r,-s=com.apple.TimeMachine." + snapshotDate, "/", snapshotPath)
if err != nil { if err != nil {
LOG_ERROR("VSS_CREATE", "Error while mounting snapshot: " + err.Error()) LOG_ERROR("VSS_CREATE", "Error while mounting snapshot: " + err.Error())
return top return top
} }
LOG_DEBUG("VSS_PROPERTY", "Returned path: %s", snapshotPath + top)
LOG_INFO("VSS_DONE", "Shadow copy created and mounted at %s", snapshotPath) LOG_INFO("VSS_DONE", "Shadow copy created and mounted at %s", snapshotPath)
return snapshotPath + top return snapshotPath + top