Skip to content

Commit

Permalink
Fix opening Filezilla on Windows
Browse files Browse the repository at this point in the history
(reference #113 )
  • Loading branch information
piotrzarzycki21 committed May 21, 2024
1 parent 38a9e93 commit 7d7a076
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
5 changes: 5 additions & 0 deletions Genesis/Source/prominic/helpers/PathUtil.hx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ class PathUtil
{
public static function getValidatedAppPath(path:String):String
{
if (path == "" || path == null)
{
return null;
}

var finalExecutablePath:String;
var splitPath = path.split("/");
var file:File;
Expand Down
12 changes: 10 additions & 2 deletions Source/superhuman/server/Server.hx
Original file line number Diff line number Diff line change
Expand Up @@ -555,10 +555,12 @@ class Server {
if (appData != null && appData.exists)
{
console.appendText( LanguageManager.getInstance().getString( 'serverpage.server.console.openftp' ) );
Logger.debug( '${this}: ' + LanguageManager.getInstance().getString( 'serverpage.server.console.openftp' ) );
}
else
{
console.appendText( LanguageManager.getInstance().getString( 'serverpage.server.console.openftpFailed', appData.appId ) );
Logger.debug( '${this}: ' + LanguageManager.getInstance().getString( 'serverpage.server.console.openftpFailed', appData.appId ) );
return;
}
}
Expand All @@ -570,12 +572,18 @@ class Server {
var pass = settings.get('vagrant_user_pass');

var ftpAppCommand = 'sftp://${userName}:${pass}@${this.domainName}';
var ftpExecutor = new Executor( appData.executablePath, [ ftpAppCommand ]);
var clientCommand = appData.executablePath;
#if windows
clientCommand = 'start "" "${appData.executablePath}" ${ftpAppCommand}';
Sys.command( clientCommand );
Logger.debug( '${this}: ' + '[Execute: ${clientCommand}]' );
#else
var ftpExecutor = new Executor(clientCommand, [ftpAppCommand]);
ftpExecutor.execute();
#end
}

public function saveData() {

try {

var s = Json.stringify( getData() );
Expand Down

0 comments on commit 7d7a076

Please sign in to comment.