From d1127395bef77a2778d25293a6d35819abd8b7a8 Mon Sep 17 00:00:00 2001 From: MNS26 Date: Thu, 13 Jun 2024 15:37:14 +0200 Subject: [PATCH] text fix for CI failing --- config/usb.ini | 3 ++- patches/SDFS.py => patch-SDFS.py | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) rename patches/SDFS.py => patch-SDFS.py (82%) diff --git a/config/usb.ini b/config/usb.ini index c2cc867..b104dd8 100644 --- a/config/usb.ini +++ b/config/usb.ini @@ -28,7 +28,8 @@ build_flags = lib_deps = ${pico_common.libs} Adafruit TinyUSB Library @ ^3.0.0 -extra_scripts = pre:patches/SDFS.py + +extra_scripts = pre:patch-SDFS.py ;[env:usb_debug] ;extends = env:usb diff --git a/patches/SDFS.py b/patch-SDFS.py similarity index 82% rename from patches/SDFS.py rename to patch-SDFS.py index 37ecc64..fd99dd2 100644 --- a/patches/SDFS.py +++ b/patch-SDFS.py @@ -3,19 +3,19 @@ Import("env") FRAMEWORK_DIR = env.PioPlatform().get_package_dir("framework-arduinopico") -patchflag_path = join(FRAMEWORK_DIR, ".patching-done") +patchflag_path = join(FRAMEWORK_DIR, "libraries", "SDFS", "src", ".patching-done") + # patch file only if we didn't do it before if not isfile(join(FRAMEWORK_DIR, ".patching-done")): original_file = join(FRAMEWORK_DIR, "libraries", "SDFS", "src", "SDFS.h") - patched_file = join("SDFS.patch") + patched_file = join("patches", "SDFS.patch") assert isfile(original_file) and isfile(patched_file) env.Execute("patch %s %s" % (original_file, patched_file)) # env.Execute("touch " + patchflag_path) - def _touch(path): with open(path, "w") as fp: fp.write("")