8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7dbe82 commit 94acf41Copy full SHA for 94acf41
lib/utils/pyexec.c
@@ -542,8 +542,12 @@ int pyexec_file(const char *filename) {
542
}
543
544
int pyexec_file_if_exists(const char *filename) {
545
- mp_import_stat_t stat = mp_import_stat(filename);
546
- if (stat != MP_IMPORT_STAT_FILE) {
+ #if MICROPY_MODULE_FROZEN
+ if (mp_frozen_stat(filename) == MP_IMPORT_STAT_FILE) {
547
+ return pyexec_frozen_module(filename);
548
+ }
549
+ #endif
550
+ if (mp_import_stat(filename) != MP_IMPORT_STAT_FILE) {
551
return 1; // success (no file is the same as an empty file executing without fail)
552
553
return pyexec_file(filename);
0 commit comments