Skip to content

Commit

Permalink
Added isNegated argument to _QtIfwScript.pathExists.
Browse files Browse the repository at this point in the history
  • Loading branch information
BuvinJ committed Jan 7, 2021
1 parent a2e5bde commit 145aa16
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions distbuilder/qt_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ class _QtIfwScript:

__GET_ENV_VAR_TMPL = "installer.environmentVariable( %s )"

__PATH_EXISTS_TMPL = "installer.fileExists( %s )"
__PATH_EXISTS_TMPL = "%sinstaller.fileExists( %s )"

__RESOLVE_DYNAMIC_VARS_TMPL = "resolveDynamicVars( %s, %s )"

Expand Down Expand Up @@ -1354,16 +1354,16 @@ def disableQuitPrompt():
_QtIfwScript.QUIT_MSGBOX_ID, _QtIfwScript.YES )

@staticmethod
def pathExists( path, isAutoQuote=True ):
def pathExists( path, isNegated=False, isAutoQuote=True ):
return _QtIfwScript.__PATH_EXISTS_TMPL % (
"!" if isNegated else "",
_QtIfwScript._autoQuote( path, isAutoQuote ),)

@staticmethod
def ifPathExists( path, isNegated=False,
isAutoQuote=True, isMultiLine=False ):
return 'if( %s%s )%s\n%s' % (
"!" if isNegated else "",
_QtIfwScript.pathExists( path, isAutoQuote ),
return 'if( %s )%s\n%s' % (
_QtIfwScript.pathExists( path, isNegated, isAutoQuote ),
("{" if isMultiLine else ""), (2*_QtIfwScript.TAB) )

@staticmethod
Expand Down
2 changes: 1 addition & 1 deletion docs/LowLevel.md
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ Static Functions:
getEnv( varName, isAutoQuote=True )

pathExists( path, isAutoQuote=True )
pathExists( path, isNegated=False, isAutoQuote=True )
ifPathExists( path, isNegated=False, sAutoQuote=True, isMultiLine=False )

makeDir( path ) <recursive, path can include native env vars>
Expand Down

0 comments on commit 145aa16

Please sign in to comment.