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

System.IO.IOException: The file cannot be accessed by the system. #2664

Closed
ghost opened this issue Aug 1, 2017 · 3 comments
Closed

System.IO.IOException: The file cannot be accessed by the system. #2664

ghost opened this issue Aug 1, 2017 · 3 comments
Labels

Comments

@ghost
Copy link

ghost commented Aug 1, 2017

After uninstalling a Windows Insider Preview Build and going back to the "stable" version of Windows, ShareX now gives me this error on program startup:

System.IO.IOException: The file cannot be accessed by the system.

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
   at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
   at ShareX.Program.ReadPersonalPathConfig()
   at ShareX.Program.CheckPersonalPathConfig()
   at ShareX.Program.UpdatePersonalPath()
   at ShareX.Program.Main(String[] args)

ShareX 11.8 (Release)

I already tried reinstalling the program but that didn't work.

@kirhgoph
Copy link

kirhgoph commented Aug 9, 2017

Are you able to open and move the file located at C:\Users<your_name>\Documents\ShareX\PersonalPath.cfg ?

@ghost
Copy link
Author

ghost commented Aug 10, 2017

I don't know exactly what happened to the files, I only think of Windows might have corrupted them during the downgrade, I also noticed the screenshots I took were all unreadable.
Nevertheless I could "solve" the issue by deleting the ShareX folder in the Documents directory and initializing the program afterwards.
Now ShareX is working as intended and my new screenshots aren't corrupted files any more.

@Jaex
Copy link
Member

Jaex commented Aug 10, 2017

Probably Windows changed permissions of Documents/ShareX folder while downgrading.

@Jaex Jaex added the Invalid label Aug 10, 2017
@Jaex Jaex closed this as completed Aug 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants