ArduPilot / ArduPilot/MissionPlanner
MAVFTP: delete folder and rename folder don't work
- Dominant language
- C#
- Stars
- 2.4k
- Forks
- 2.9k
- Avg merge
- 19h 16m
- Merged PRs (30d)
- 4
Description
To help users quickly clear the TERRAIN folder on the SD card (see Blog Post here) it would be very helpful if Mission Planner could delete an entire directory via MAVFTP. Sadly the error below appears
When "Details" is clicked the following message is displayed
```
Failed to OpenFile - kCmdRemoveFile kErrFailErrno EACCES
at MissionPlanner.ArduPilot.Mavlink.MAVFtp.kCmdRemoveFile(String file, CancellationTokenSource cancel) in D:\a\MissionPlanner\MissionPlanner\ExtLibs\ArduPilot\Mavlink\MAVFtp.cs:line 1770
at MissionPlanner.Controls.MavFTPUI.<>c__DisplayClass14_0.b__1(IProgressReporterDialogue iprd) in D:\a\MissionPlanner\MissionPlanner\Controls\MavFTPUI.cs:line 451
at MissionPlanner.Controls.ProgressReporterDialogue.RunBackgroundOperation(Object o) in D:\a\MissionPlanner\MissionPlanner\ExtLibs\Controls\ProgressReporterDialogue.cs:line 111
```
Similarly attempting to rename the folder also fails with this message
To add the confusion, if the user selects **not** to report the error the right-mouse-button menu is no longer accessible unless MP is restarted.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in ExtLibs/ArduPilot/Mavlink/MAVFtp.cs at kCmdRemoveFile, line 1770, and follow the delete action from Controls/MavFTPUI.cs line 451. Reproduce folder deletion and renaming through the MAVFTP UI, then verify both operations succeed and that declining the error does not disable the context menu.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100