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

LocalHistory sometimes saves backup files within wrong path #1

Open
SylwesterZarebski opened this issue Jun 30, 2016 · 6 comments
Open

Comments

@SylwesterZarebski
Copy link

Sometimes LocalHistory saves backup files with absolute path and not relative and with small letters.
These backup files is not visible in Local History window.

Normally backup files are stored like (for solution in d:/Projects/MySolution and MyProject):
d:/Projects/MySolution/.localhistory/MyProject/SubDirectory/1448363004$MyFile.cs but sometimes it creates directories like: d:/Projects/MySolution/.localhistory/d/projects/mysolution/myproject/subdirectory/1448363004$myfile.cs`

It happens very random, sometimes many times a day, sometimes many days without problem...

@curzona
Copy link
Owner

curzona commented Jun 30, 2016

The wrong path is created when it thinks the file is outside the current solution.
https://github.com/curzona/local-history-visual-studio/blob/master/LocalHistory/DocumentRepository.cs#L106

Are you opening/closing/changing solutions after opening visual studio?
When the bug occurs does it happen for every save until VisualStudio is reopened?

@SylwesterZarebski
Copy link
Author

No to both questions. It happens very random, today saves about 10 "abnormal" history and about 100 "normal". My guess is something inside (maybe Windows internal) returning lowercased path.

@SylwesterZarebski
Copy link
Author

SylwesterZarebski commented Jul 2, 2016

It looks like there is problem with opened file path saved in solution (suo files).
Reproduced this as:

  1. Open VS, open any solution
  2. Open two files with one file in current tab
  3. Close solution, close VS
  4. Open VS, open solution
  5. Save file in current tab - it works good
  6. Change to other file/tab (one which wasn't active when closing solution), save this file - backup goes to wrong directory.

Closing tab/file and opening bring back correct backup path.
Maybe this is Visual Studio bug or some extension make this? I'll try to check on vanilla install.

PS. My Visual Studio version is 2013.

@SylwesterZarebski
Copy link
Author

Just tested with disabled extensions and also SafeMode and it looks like Visual Studio save wrong (lowercased) paths in SUO file and then use it after solution reopening.

@patrickwolf
Copy link

patrickwolf commented Nov 9, 2016

Maybe it has to do with the Resharper extension because for me most files are saved in the wrong path which makes them not show up in the Local History tab.

Would be awesome to get this fixed!

@SylwesterZarebski
Copy link
Author

More testing shows it is very weird because reopened solutions shows lowercased paths for all files besides the one which was current when closing solution. Check for path by hovering over opened file tab shows lowercased path.

I do not use ReSharper.
In free time i'll prepare clean system with clean VS 2015 to test it more.

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