PieterVanPoyer commented on a change in pull request #1113:
URL: https://github.com/apache/cordova-android/pull/1113#discussion_r541959425



##########
File path: bin/templates/cordova/lib/prepare.js
##########
@@ -317,28 +318,13 @@ function getAdaptiveImageResourcePath (resourcesDir, 
type, density, name, source
     return resourcePath;
 }
 
-/**
- * The splashScreenSrc is a .webp image or a .png (or .jpg) image.
- * An inputted .webp should be copied to a screen.webp file.
- * An inputted .png (or .jpg) should be copied to a screen.png file.
- *
- * When a splashscreen is changed from a .png to a .webp or the other way 
round,
- * the other image must be deleted, to avoid a duplicate resource exception.
- *
- * @param splashScreenSrc
- * @returns {{splashScreenDestToRemove: string, splashScreenDest: string}}
- */
-function buildSplashScreenImageToCopyAndToRemove (splashScreenSrc) {
-    if (path.extname(splashScreenSrc) === '.webp') {
-        return {
-            splashScreenDest: 'screen.webp',
-            splashScreenDestToRemove: 'screen.png'
-        };
-    }
-    return {
-        splashScreenDest: 'screen.png',
-        splashScreenDestToRemove: 'screen.webp'
-    };
+function makeSplashCleanupMap (projectRoot, resourcesDir) {
+    // Build an initial resource map that deletes all existing splash screens
+    const existingSplashPaths = glob.sync(

Review comment:
       Fixed in next commit.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to