Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SD.remove() fails on file name that has no extension, confuses it for a directory name #9465

Open
1 task done
frankcohen opened this issue Apr 8, 2024 · 2 comments
Open
1 task done
Assignees
Labels
Status: Awaiting triage Issue is waiting for triage

Comments

@frankcohen
Copy link

Board

ESP32-S3 Dev Module

Device Description

Reflections open-source project uses ESP32-S3 Mini 1 with a Nand (an SD in SMT format) XTSD01GLGEAG chip. Schematic and Gerber files at https://github.com/frankcohen/ReflectionsOS/tree/main/Devices/Yertle

Hardware Configuration

// SPI Bus
#define SPI_MOSI 35
#define SPI_MISO 37
#define SPI_SCK 36
#define SPI_SPEED 10000000

// NAND Storage
#define NAND_SPI_CS 15

Version

latest master (checkout manually)

IDE Name

Arduino IDE 2.3.2

Operating System

MacOS Sonoma 14.4.1

Flash frequency

80 Mhz

PSRAM enabled

yes

Upload speed

115200

Description

Remove file named /REFLECTIONS/log1 and get an error: File or Directory does not exist. It appears to confuse log1 for a directory.
Remove file named /REFLECTIONS/log1.txt and it removes the file successfully.

Sketch

void deleteFile(fs::FS &fs, const char * path){
    Serial.printf("Deleting file: %s\n", path);
    if(fs.remove(path)){
        Serial.println("File deleted");
    } else {
        Serial.println("Delete failed");
    }
}

Debug Message

No debug info given when it fails.

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@frankcohen frankcohen added the Status: Awaiting triage Issue is waiting for triage label Apr 8, 2024
@lbernstone
Copy link
Contributor

Please provide code. Unable to reproduce
https://wokwi.com/projects/394638383953711105

@frankcohen
Copy link
Author

The whole of the code is at https://github.com/frankcohen/ReflectionsOS/tree/main/src
The delete isn't working in logger.cpp. That's too much to send. I'm going to write a smaller sketch showing the problem. Will post tomorrow. -Frank

@P-R-O-C-H-Y P-R-O-C-H-Y self-assigned this Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Awaiting triage Issue is waiting for triage
Projects
None yet
Development

No branches or pull requests

3 participants