Fixing test
This commit is contained in:
parent
1ecf32f4d8
commit
29e58ee3f3
9 changed files with 8 additions and 364 deletions
|
|
@ -354,7 +354,7 @@ namespace MatterHackers.MatterControl.Library
|
|||
public class DirectoryContainerLink : FileSystemItem, ILibraryContainerLink
|
||||
{
|
||||
public DirectoryContainerLink(string path)
|
||||
: base(path, null)
|
||||
: base(path)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@ namespace MatterHackers.MatterControl.Library
|
|||
{
|
||||
public class FileSystemFileItem : FileSystemItem, ILibraryAssetStream
|
||||
{
|
||||
public FileSystemFileItem(string path, Func<FileSystemItem, string> getFirstSaveName = null)
|
||||
: base(path, getFirstSaveName)
|
||||
public FileSystemFileItem(string path)
|
||||
: base(path)
|
||||
{
|
||||
var fileInfo = new FileInfo(path);
|
||||
if (fileInfo.Exists)
|
||||
|
|
|
|||
|
|
@ -40,13 +40,9 @@ namespace MatterHackers.MatterControl.Library
|
|||
{
|
||||
private string fileName;
|
||||
|
||||
private Func<FileSystemItem, string> getFirstSaveName;
|
||||
|
||||
public FileSystemItem(string path, Func<FileSystemItem, string> getFirstSaveName = null)
|
||||
public FileSystemItem(string path)
|
||||
{
|
||||
this.Path = path;
|
||||
this.getFirstSaveName = getFirstSaveName;
|
||||
|
||||
var type = GetType();
|
||||
|
||||
try
|
||||
|
|
@ -105,25 +101,6 @@ namespace MatterHackers.MatterControl.Library
|
|||
}
|
||||
}
|
||||
|
||||
private string _path;
|
||||
public string Path
|
||||
{
|
||||
get
|
||||
{
|
||||
if (getFirstSaveName != null)
|
||||
{
|
||||
var newPath = getFirstSaveName(this);
|
||||
if (!string.IsNullOrEmpty(newPath))
|
||||
{
|
||||
getFirstSaveName = null;
|
||||
_path = newPath;
|
||||
}
|
||||
}
|
||||
|
||||
return _path;
|
||||
}
|
||||
|
||||
set => _path = value;
|
||||
}
|
||||
public string Path { get; set; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue