Quantcast
Channel: Task Scheduler Managed Wrapper
Viewing all articles
Browse latest Browse all 2206

Closed Unassigned: Task.Folder return null [12057]

$
0
0
It was reproduced only on Win Server 2008 Enterprise.
If you create a task in root folder the Task's field 'Folder' return null at first time.
That's happen because IRegisteredTask.Path returns the path without a slash at the beginning.
After the reloading data the issue disappear.
```
public TaskFolder Folder
{
get
{
if (v2Task == null)
return this.TaskService.RootFolder;

string path = v2Task.Path;
string parentPath = System.IO.Path.GetDirectoryName(path);
if (string.IsNullOrEmpty(parentPath))
return null;
return this.TaskService.GetFolder(parentPath);
}
}
```
(To get new task I use TaskEditorDialog.)
We can check v2Task.Path and add slash manually to the beginning. What do you think?
Also why this.TaskService.RootFolder return null when parentPath is empty. Maybe it should return this.TaskService.RootFolder?
Comments: Fixed in version 2.3.1. Thanks for finding this.

Viewing all articles
Browse latest Browse all 2206

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>