mirror of
https://github.com/jkl1337/duplicacy.git
synced 2026-01-06 21:54:38 -06:00
Cleaned up formatting
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user