Issue with adding existing items located in symlink directory

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A portion of my solution is in a directory that is actually a symlink.  If I copy a source file to that directory then try to add it to the solution by right clicking in solution explorer, doing "add->existing item", then browsing to the item via the symlink, I get the message: 

---------------------------
AtmelStudio
---------------------------
A file with the same name '[path]\foo.h' already exists. Do you want to overwrite it?

---------------------------
Yes   No   
---------------------------

If I select yes, I get the error:
The file can not be opened because it is being used by another process. Please close all applications that might access this file and try again.

 

So far the only (extremely annoying) work around I have found is to copy the contents of the existing file, do "add->new item", name it to match the existing one, let it overwrite the existing one, then paste the contents and save.

 

Is there any other way to get around this bug?

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Other than a symbolic link?

Hard Links and Junctions - Win32 apps | Microsoft Docs

There are three types of file links supported in the NTFS file system: hard links, junctions, and symbolic links.

...

due to Solved: AS7 Not detecting changes in (symbolic linked) files? | AVR Freaks

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sorry for the delayed reply.  This forum doesn't send me notifications even though the box is most definitely checked. 

 

So it may be the nature of symlinks (not storing timestamp, etc.) that is the cause of this?  Unfortunately, I don't think hard links are a good fit for my needs.  

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hillridge wrote:
Unfortunately, I don't think hard links are a good fit for my needs.
Junctions link [local] directories; if my comprehension of post #1 is [complete and] correct then consider junctions.

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Fri. Jan 3, 2020 - 10:40 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is there anything special about junctions that symlinks can't do?  I thought that symlinks were basically a more advanced version of a junction.  I know one big difference is that junctions need an absolute path, where as symlinks can use a relative path.  I may be able to work around this if there's a benefit to junctions, but having a relative path is preferred.

 

Hardlinks are out because my symlinks are to folders, not individual files.