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

MEGA65_FTP: Mount in subdirectories broken #185

Open
ki-bo opened this issue Jan 1, 2024 · 0 comments
Open

MEGA65_FTP: Mount in subdirectories broken #185

ki-bo opened this issue Jan 1, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ki-bo
Copy link
Member

ki-bo commented Jan 1, 2024

Test Environment (required)

  • Tools Platform: any
  • Tools Version: 20231223.18-develo-fa53075
  • MEGA65 Platform: MEGA65
  • ROM Release: 920390
  • Core Commit: 4cce286

Describe the bug
MEGA65_FTP has a mount command which indicates it can mount D81 images from the working directory the user navigated to within the tool. The PC part of MEGA65_FTP will now do direct remote access to the file system to double-check the filename requested by mount actually exists in the directory (so far so good). But then, it sends over a request to the helper application to request to execute the mount command via Hyppo, and this one actually just receives the local filename (without path) and will do set_name and mount hyppo traps. This completely ignores the current working dir of the hyppo and will always try to mount from the CWD that was active on the machine before the helper was started. As the JTAG version of MEGA65_FTP even lacks proper error reporting in case the mount did fail, the user will not even notice it did not mount anything. The user will just be surprised that after quit the image is sometimes not mounted at all.

To Reproduce
Steps to reproduce the behavior:

  1. Power cycle to be in the root directory of the SD
  2. Start MEGA65_FTP via UART
  3. cd to a subdir where a D81 is located
  4. execute mount
  5. quit
  6. Do DIR - the D81 was not mounted as long as no other D81 with that name also resides in the root (then that one actually was mounted)

Expected behavior
The mount command shall make sure it changes the CWD to the correct subdir on the MEGA65 before the mount is executed. This also involves adaption of the communications protocol, as that one only supports sending of the filename itself. It will also need to provide the subdir path.

As a first step, it should be restricted to only allow mount from the root (and do a chdir to root in the helper) so we at least get a consistent behaviour (restricted to mounting from root for now). The final implementation needs to have mentioned directory changing.

@ki-bo ki-bo added new New report, not classified yet bug Something isn't working and removed new New report, not classified yet labels Jan 1, 2024
ki-bo added a commit to ki-bo/mega65-tools that referenced this issue Jan 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant