diff options
author | Kenneth Skovhede <kenneth@hexad.dk> | 2014-11-06 03:23:31 +0300 |
---|---|---|
committer | Kenneth Skovhede <kenneth@hexad.dk> | 2014-11-06 03:23:31 +0300 |
commit | e3c6682d29867a6820e1a5326247a449c768381f (patch) | |
tree | e3be17674150fab767b317439a2bfa726932ef78 /Duplicati/Library/Snapshots/NoSnapshotWindows.cs | |
parent | 3d89a1a89bd76f8bd968019016d59ce46cb521c9 (diff) |
Improved handling of metadata, especially on Linux/OSX
Diffstat (limited to 'Duplicati/Library/Snapshots/NoSnapshotWindows.cs')
-rw-r--r-- | Duplicati/Library/Snapshots/NoSnapshotWindows.cs | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/Duplicati/Library/Snapshots/NoSnapshotWindows.cs b/Duplicati/Library/Snapshots/NoSnapshotWindows.cs index 988e89a1b..27d4ce85a 100644 --- a/Duplicati/Library/Snapshots/NoSnapshotWindows.cs +++ b/Duplicati/Library/Snapshots/NoSnapshotWindows.cs @@ -76,11 +76,17 @@ namespace Duplicati.Library.Snapshots /// <returns>The last write time of the file</returns>
public override DateTime GetLastWriteTimeUtc (string file)
{
- if (!SystemIOWindows.IsPathTooLong(file))
- try { return base.GetLastWriteTimeUtc(file); }
- catch (System.IO.PathTooLongException) { }
+ return m_sysIO.FileGetLastWriteTimeUtc(file);
+ }
- return File.GetLastWriteTimeUtc(SystemIOWindows.PrefixWithUNC(file));
+ /// <summary>
+ /// Gets the last write time of a given file in UTC
+ /// </summary>
+ /// <param name="file">The full path to the file in non-snapshot format</param>
+ /// <returns>The last write time of the file</returns>
+ public override DateTime GetCreationTimeUtc (string file)
+ {
+ return m_sysIO.FileGetCreationTimeUtc(file);
}
/// <summary>
@@ -90,11 +96,7 @@ namespace Duplicati.Library.Snapshots /// <returns>An open filestream that can be read</returns>
public override System.IO.Stream OpenRead (string file)
{
- if (!SystemIOWindows.IsPathTooLong(file))
- try { return base.OpenRead(file); }
- catch (System.IO.PathTooLongException) { }
-
- return File.OpenRead(SystemIOWindows.PrefixWithUNC(file));
+ return m_sysIO.FileOpenRead(file);
}
/// <summary>
@@ -142,7 +144,7 @@ namespace Duplicati.Library.Snapshots /// <param name="file">The file or folder to examine</param>
public override Dictionary<string, string> GetMetadata(string file)
{
- return null;
+ return m_sysIO.GetMetadata(file);
}
/// <summary>
|