mirror of
https://github.com/jkl1337/duplicacy.git
synced 2026-01-03 04:04:45 -06:00
Improved cron support
Now calls mount and unmount using absolute path
This commit is contained in:
@@ -74,7 +74,7 @@ func DeleteShadowCopy() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
err := exec.Command("umount", "-f", snapshotPath).Run()
|
err := exec.Command("/sbin/umount", "-f", snapshotPath).Run()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
LOG_ERROR("VSS_DELETE", "Error while unmounting snapshot")
|
LOG_ERROR("VSS_DELETE", "Error while unmounting snapshot")
|
||||||
return
|
return
|
||||||
@@ -158,7 +158,7 @@ func CreateShadowCopy(top string, shadowCopy bool, timeoutInSeconds int) (shadow
|
|||||||
|
|
||||||
// Mount snapshot as readonly and hide from GUI i.e. Finder
|
// Mount snapshot as readonly and hide from GUI i.e. Finder
|
||||||
_, err = CommandWithTimeout(timeoutInSeconds,
|
_, err = CommandWithTimeout(timeoutInSeconds,
|
||||||
"mount", "-t", "apfs", "-o", "nobrowse,-r,-s=com.apple.TimeMachine." + snapshotDate, "/", snapshotPath)
|
"/sbin/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)
|
LOG_ERROR("VSS_CREATE", "Error while mounting snapshot: ", err)
|
||||||
return top
|
return top
|
||||||
|
|||||||
Reference in New Issue
Block a user