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

EROFS (Read-only file system) #49

Closed
aitizazsyed02 opened this issue May 29, 2020 · 8 comments
Closed

EROFS (Read-only file system) #49

aitizazsyed02 opened this issue May 29, 2020 · 8 comments
Labels
bug Something isn't working

Comments

@aitizazsyed02
Copy link

aitizazsyed02 commented May 29, 2020

getting this error please help
Caused by: java.io.FileNotFoundException: test.csv: open failed: EROFS (Read-only file system)

@aitizazsyed02 aitizazsyed02 changed the title error EROFS (Read-only file system) May 29, 2020
@doyaaaaaken doyaaaaaken added the bug Something isn't working label May 30, 2020
@doyaaaaaken
Copy link
Owner

Thank you.
Could you give me information about the bug?
For example,

  • kotlin-csv version
  • environment information (OS, jdk version, etc)
  • describe the bug A clear and concise description of what the bug is.
  • To Reproduce Steps to reproduce the behavior: (attach sample code)
  • Screenshots If applicable, add screenshots to help explain your problem.

@aitizazsyed02
Copy link
Author

  • kotlin-csv version 0.9.0.
  • java version 14
  • I tried the exact same code provided in the README file as an example.
  • Example used
    val row1 = listOf("a", "b", "c")
    val row2 = listOf("d", "e", "f")
    csvWriter().open("test.csv") {
    writeRow(row1)
    writeRow(row2)
    writeRows(listOf(row1, row2))
    }

@doyaaaaaken
Copy link
Owner

I cannot reproduce the bug... Maybe, this link helps you.[https://stackoverflow.com/questions/27103877/java-io-filenotfoundexception-open-failed-erofs-read-only-file-system](java.io.FileNotFoundException: open failed: EROFS (Read-only file system)).
This article says it makes failure to save file in the root system partition which is always read-only.

@aitizazsyed02
Copy link
Author

What's the location of a file where it will be saved using writeRows and writeAll?
how can we define our custom path?

@doyaaaaaken
Copy link
Owner

doyaaaaaken commented Jun 2, 2020

As you see this line, the passed file name is simply converted to java.io.File.

Or, you can pass java.io.File directly instead of file name (String).

csvWriter().open(File("test.csv")) {
//...
}

@aitizazsyed02
Copy link
Author

I have storage permission granted. but still this problem occurs. I have noticed it happen in android 10

@aitizazsyed02
Copy link
Author

/storage/emulated/0/Documents/test.csv: open failed: ENOENT (No such file or directory)

@doyaaaaaken
Copy link
Owner

doyaaaaaken commented Jun 3, 2020

Sorry, I cannot do anything about java.io.File specific problem.

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

2 participants