Skip to content

Commit

Permalink
fixed bug creating new file set
Browse files Browse the repository at this point in the history
GuiMods has a modified file that differs between Venus versions and the wrong replacement was selected.
  • Loading branch information
kwindrem committed Jun 26, 2021
1 parent 554cecf commit 844d0e8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
Binary file modified .DS_Store
Binary file not shown.
23 changes: 16 additions & 7 deletions CommonResources
Original file line number Diff line number Diff line change
Expand Up @@ -394,16 +394,22 @@ _checkFileSets ()
continue
fi

# if an active file exists, look for a match in other file sets
# if an active file exists
# find the LATEST match in PREVOUS file sets
if [ ! -z "$activeFile" ]; then
# look for a match in another version
matchFound=false
for v2 in ${versionList[@]} ; do
otherVersion=$(basename $v2)
# search the version list backwards so the first match is the latest one
local i=${#versionList[@]}
while (( i > 0 )); do
(( i-- ))
otherVersion=$(basename ${versionList[i]})
versionStringToNumber $otherVersion
otherVersionDir="$pkgFileSets/$otherVersion"
otherFile="$pkgFileSets/$otherVersion/$baseName"

if [ "$otherVersion" == "$venusVersion" ]; then
# skip future versions
if (( $versionNumber > $venusVersionNumber )); then
continue
fi
# skip symbolic links and nonexistent originals
Expand Down Expand Up @@ -585,15 +591,18 @@ else
runningAtBoot=false
fi

# initialze integer version number for venus version
# used below and in _checkFileSets
versionStringToNumber $venusVersion
venusVersionNumber=$versionNumber

# check to see if package is compatible with this Venus version
notCompatible=false
if [ -f "$scriptDir/obsoleteVersion" ]; then
versionStringToNumber $(cat "$scriptDir/obsoleteVersion")
obsoleteVersion=$versionNumber

versionStringToNumber $venusVersion

if (( $versionNumber >= $obsoleteVersion )); then
if (( $venusVersionNumber >= $obsoleteVersion )); then
notCompatible=true
fi
fi
Expand Down
2 changes: 1 addition & 1 deletion timeStamp
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1624411592
1624665999

0 comments on commit 844d0e8

Please sign in to comment.