Author Topic: Duplicated entries in project due to drive letter case. (Windows)  (Read 607 times)

ehoffman

  • Community Member
  • Posts: 18
  • Hero Points: 0
Hello

I see an issue with SlickEdit since a while is that when you add files to the project, sometime you see duplicate entries in the project.  It does not matter if you are in directory view, package view or custom view.

For example, I have:

file.c: D:\Path\file.c
file.c: d:\Path\file.c
headerfile.h: D:\Path\headerfile.h
headerfile.h: d:\Path\headerfile.h

That is not the same issue I reported a while ago where entries got duplicated each time you added a tree, this one is a bit different.

You notice that the path are all case sensitive, and SlickEdit think that the duplicates are different (the drive letters does not have the same case).

Now, if you were to work with the Linux version of SlickEdit, you would not have this issue as the paths are really case-sensitive, and you do not have drive letters.

However, with the Windows version of SlickEdit, the path check should be insensitive.  The case does matter (visually) however for the path and file name so it should stay as is.  But the issue is with the drive letter, which is a Windows-specific paradigm (dating to DOS), for which we really have no standard for the case.  Drive letter can be written lower or upper case and that will not change the semantic.  Microsoft like to write the drive letter uppercase, most Linux fans (including me :)) are used to having lowercase paths by default, but Windows will handle any paths case insensitively.

As such, different parts of SlickEdit/Windows will return a drive letter lowercase and other parts will return uppercase.  When adding file to the project, that case insensitivity should properly be handled, and not duplicate the entries in the project file.

Note that this occurs when the files are on a different drive letter that the SlickEdit project, where the path added is an absolute path to the file.

This is kind of easy also to get different drive letter case, as when you add file to project (from the project properties dialog for example), if you click 'add file...', and browse for a file, you get the standard Windows file browser, which will return an uppercase drive letter.  And if you click 'add tree...' instead, you have a custom SlickEdit directory browser dialog which display (and return) all drive letters as lowercase.  So just mixing the 2 methods to add files you will end up having duplicate entries in the project list, with different drive letter case.

Since Microsoft like to display the drive letters upper-case (which make it kind of a Windows 'standard' I guess), maybe the (Windows) SlickEdit directory/file browsers should display and return the drive letter always uppercase, and the project property manager treat the drive letter case insensitive.

Note that I tested and this is there in 21.0.3.

Best regards,
Eric

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1161
  • Hero Points: 107
Re: Duplicated entries in project due to drive letter case. (Windows)
« Reply #1 on: June 02, 2017, 04:27:05 pm »
Are the source files on a different drive than the project file?  I will look into that, there may be an issue there that may be hotfixable.

ehoffman

  • Community Member
  • Posts: 18
  • Hero Points: 0
Re: Duplicated entries in project due to drive letter case. (Windows)
« Reply #2 on: June 15, 2017, 01:52:24 am »
Hello

Sorry for the delay, I kind of forgot about this thread  :-[

Yes, the source files need to be on a different drive.  Otherwise the drive letter is not present in the paths.

Regards,
Eric