Parent folder for directories

This commit is contained in:
fgonzalez
2018-06-14 15:59:33 +02:00
parent f909e5eeac
commit 4e4f4cb08c
@@ -321,6 +321,13 @@ namespace Duplicati.Library.Main.Operation
Logging.Log.WriteVerboseMessage(LOGTAG, "PatchingMetadata", "Patching metadata with remote data: {0}", targetpath);
try
{
var folderpath = Duplicati.Library.Utility.Utility.GetParent(targetpath, false);
if (!options.Dryrun && !m_systemIO.DirectoryExists(folderpath))
{
Logging.Log.WriteWarningMessage(LOGTAG, "CreateMissingFolder", null, "Creating missing folder {0} for target {1}", folderpath, targetpath);
m_systemIO.DirectoryCreate(folderpath);
}
ApplyMetadata(targetpath, metainfo.Value, options.RestorePermissions, options.RestoreSymlinkMetadata, options.Dryrun);
}
catch (Exception ex)