Skip to content
Snippets Groups Projects
Commit 8908c94f authored by brinn's avatar brinn
Browse files

Add support for DataCompletedScripts which are batch files (on Windows).

SVN: 26079
parent 92694818
No related branches found
No related tags found
No related merge requests found
...@@ -99,11 +99,18 @@ public class DataCompletedFilter implements IStoreItemFilter ...@@ -99,11 +99,18 @@ public class DataCompletedFilter implements IStoreItemFilter
{ {
final StoreItemLocation storeItemLocation = fileStore.getStoreItemLocation(item); final StoreItemLocation storeItemLocation = fileStore.getStoreItemLocation(item);
final List<String> command = new ArrayList<String>(); final List<String> command = new ArrayList<String>();
final String path = FileUtilities.getCanonicalPath(getDataCompletedScript());
if (OSUtilities.isWindows()) if (OSUtilities.isWindows())
{ {
command.add("sh"); if (path.endsWith(".bat"))
{
command.add("cmd");
} else // Assume we have Cygwin's shell.
{
command.add("sh");
}
} }
command.add(FileUtilities.getCanonicalPath(getDataCompletedScript())); command.add(path);
command.add(storeItemLocation.getAbsolutePath()); command.add(storeItemLocation.getAbsolutePath());
final String host = storeItemLocation.getHost(); final String host = storeItemLocation.getHost();
if (host != null) if (host != null)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment