Author Topic: "Close Selected" in "Reload Modified Files" not working when symlinked dir  (Read 235 times)

rowbearto

  • Senior Community Member
  • Posts: 853
  • Hero Points: 30
When I have symlinked directories containing logfiles, and this symlink changes, when presented with the "reload modified files" dialog and selecting "Close", the files are not closing. Here is how to reproduce this scenario:

1) Create 2 directories under the same parent: "prev1", "prev2"
2) Create 2 logfiles: prev1/a.log and prev2/a.log. Make sure the contents of these logfiles are different.
3) at linux prompt, "cd" to the parent directory of prev1 and prev2
4) In this parent directory, do "ln -s prev1 curr", which makes "curr" point to "prev1"
5) Close all files in SE
6) Open "curr/a.log" in SE (important to use "curr" directory as this is the symlink)
7) At linux prompt in another window, change the symlink for "curr" to prev2 by doing: "rm curr;ln -s prev2 curr"
8) SE will say that a.log has been modified, at this dialog select "Close" for a.log
9) Notice that a.log does not get closed

This is a real scenario that I encounter all the time - it is not contrived.

Each time I do a new test run, a new directory with a timestamp is created (analogous to the prev1 and prev2) and many logfiles from my test run are placed there. "curr" is symlinked to the latest test run directory. This makes it easier for me to find the latest logfiles.

I have also noticed some other issues where in the "Files" tab I select one of these logs and press "DEL" key to close this file, but instead a different file is getting closed. Have not yet found a 100% reproducible way to recreate this, but maybe when you analyze the first scenario you could see how this 2nd scenario can occur.
« Last Edit: January 08, 2018, 10:03:52 pm by rowbearto »

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1971
  • Hero Points: 86
I will look into this.

rowbearto

  • Senior Community Member
  • Posts: 853
  • Hero Points: 30
Found a related issue when symlinked dir changes in 22.0.1 in linux x64 environment (CentOS) where it creates extra editor tabs for the same file after clicking "Close" on "Save Deleted Files" - see attached screenshot.

To reproduce:

1) extract the attached tar.gz file in a linux environment (haven't tried windows, but there is a symlink in this tar.gz file so windows probably not good for this)
2) Close all files in SE
3) In SE smart open, cd to src and open the following files in order: src/aa.py, src/bb.py, src/cc.py, src/dd.py
4) Upon extraction, the "curr" directory should be a symlink to "test1" dir
5) In SE smart open, cd to "curr" and open the following files in order: curr/cc.log, curr/log001.log, curr/log002.log, curr/log003.log, curr/log004.log
6) At a linux prompt, cd to the "symlinkdir" which is the parent of "src" and "curr"
7) at this linux prompt change the symlink by doing: rm curr; ln -s test2 curr
8) Go back to SE
9) SE prompts to reload cc.log, click on "Reload selected"
10) SE next displays the "Save Deleted Files" showing the 4 log00X.log files. Make sure all are checked and click on "Close Selected"
11)  After this is done, the editor has created extra tabs for cc.log that should not be there, see attached screenshot
« Last Edit: January 09, 2018, 04:48:57 pm by rowbearto »

rowbearto

  • Senior Community Member
  • Posts: 853
  • Hero Points: 30
Dan: Were you able to reproduce both issues? Is it something that can be fixed for 22.0.2?

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1971
  • Hero Points: 86
I reproduced it and I will be working on it.  I hope it will make 22.0.2.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1971
  • Hero Points: 86
This will be fixed for the next hotfix.

rowbearto

  • Senior Community Member
  • Posts: 853
  • Hero Points: 30
Excellent! Thanks Dan! Does the hotfix fix both issues?

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1971
  • Hero Points: 86
It should.