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

Location is not available when trying to access a folder with Windows #26

Open
shellwhale opened this issue Jan 2, 2023 · 2 comments
Open

Comments

@shellwhale
Copy link

shellwhale commented Jan 2, 2023

package main

import (
    "log"
    "os"

	"github.com/kdomanski/iso9660"
)

func main() {
	writer, err := iso9660.NewWriter()
	if err != nil {
	  log.Fatalf("failed to create writer: %s", err)
	}
	defer writer.Cleanup()

	f, err := os.Open("myFile.txt")
	if err != nil {
	  log.Fatalf("failed to open file: %s", err)
	}
	defer f.Close()
  
	err = writer.AddFile(f, "MYFILE.TXT") // work
	if err != nil {
	  log.Fatalf("failed to add file: %s", err)
	}

	err = writer.AddFile(f, "random_folder_name/MYFILE.TXT") // doesn't work
	if err != nil {
	  log.Fatalf("failed to add file: %s", err)
	}
  
	err = writer.AddLocalDirectory("fixtures/test.iso_source", "fixtures/test.iso_source") // doesn't work
	if err != nil {
	  log.Fatalf("failed to add file: %s", err)
	}

	outputFile, err := os.OpenFile("output.iso", os.O_WRONLY | os.O_TRUNC | os.O_CREATE, 0644)
	if err != nil {
	  log.Fatalf("failed to create file: %s", err)
	}
  
	err = writer.WriteTo(outputFile, "testvol")
	if err != nil {
	  log.Fatalf("failed to write ISO image: %s", err)
	}
  
	err = outputFile.Close()
	if err != nil {
	  log.Fatalf("failed to close output file: %s", err)
	}
}

image

As anyone has been able to create a folder within the .iso file, mount the .iso, and access that folder using Windows?

@AshleyEke
Copy link

this doesn't work for me either. I tried calling writer.AddLocalDirectory instead but same issue

@xcd0
Copy link

xcd0 commented Jan 24, 2024

I also did not succeed
Does anyone have any information?

--

The current situation seems to be due to the lack of support for the Rock Ridge and Joliet extensions.
#7 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants