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

Linked VHDs in subfolders doesn't work #5145

Closed
2 tasks done
MrMEEE opened this issue Jul 30, 2024 · 3 comments · Fixed by #5153
Closed
2 tasks done

Linked VHDs in subfolders doesn't work #5145

MrMEEE opened this issue Jul 30, 2024 · 3 comments · Fixed by #5153
Labels

Comments

@MrMEEE
Copy link
Contributor

MrMEEE commented Jul 30, 2024

Describe the bug

When trying to mount a linked VHD, located in a relativ path (subfolder), mounting fails..

Steps to reproduce the behaviour

Prior to testing this, #5143 must be applied to get linked VHDs to work on Linux

  1. Create a subfolder outside of Dosbox (mkdir test)
  2. Create a VHD in current dir or a subfolder (imgmake test.vhd -t vhd -size 100)
  3. Create a VHD in the subfolder which is linked (vhdmake -l test.vhd test/subfolder_test.vhd)
  4. Try to mount the VHD (imgmount test/subfolder_test.vhd)

Expected behavior

VHD will be mounted

What operating system(s) this bug have occurred on?

Ubuntu 24.04

What version(s) of DOSBox-X have this bug?

2024.07.01

Used configuration

No response

Output log

See screenshot

Additional information

No response

Have you checked that no similar bug report(s) exist?

  • I have searched and didn't find any similar bug report.

Code of Conduct & Contributing Guidelines

  • I agree to follow the code of conduct and the contributing guidelines.
@MrMEEE MrMEEE added the bug label Jul 30, 2024
@MrMEEE
Copy link
Contributor Author

MrMEEE commented Jul 30, 2024

billede

@MrMEEE
Copy link
Contributor Author

MrMEEE commented Jul 30, 2024

//write Parent Locator sectors
wchar_t* w_basename = (wchar_t*)malloc(platsize);
memset(w_basename, 0, platsize);
for(uint32_t i = 0; i < l_basename; i++)
//dirty hack to quickly convert ASCII -> UTF-16 *LE* and fix slashes
w_basename[i] = SDL_SwapLE16(basename[i]=='/'? (uint16_t)'\\' : (uint16_t)basename[i]);
if (fwrite(w_basename, 1, platsize, vhd) != platsize) STATUS = ERROR_WRITING;
if (fwrite(w_basename, 1, platsize, vhd) != platsize) STATUS = ERROR_WRITING;

I guess that something here might be the issue..

@MrMEEE
Copy link
Contributor Author

MrMEEE commented Jul 31, 2024

hmmm.. apparently the path for the base is written correctly to the files, but when trying to mount the file, the path of the linked image is prepended to the path of the baseimage??

So if:
Linked image: test/test_linked.vhd
Base image: test4/base.vhd

Then dosbox will try to use /test/test4/base.vhd as the base image?

This is really weird..

@MrMEEE MrMEEE changed the title Linked VHDs created in subfolders doesn't work Linked VHDs with base VHDs in subfolders doesn't work Jul 31, 2024
@MrMEEE MrMEEE changed the title Linked VHDs with base VHDs in subfolders doesn't work Linked VHDs in subfolders doesn't work Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant