Skip to content

Conversation

expipiplus1
Copy link
Contributor

vim-patch:8.1.0251: using full path is not supported for 'backupdir'

Problem: Using a full path is supported for 'directory' but not for
'backupdir'. (Mikolaj Machowski)
Solution: Support 'backupdir' as well. (Christian Brabandt, closes vim/vim#179)
vim/vim@b782ba4


  • Add const bool kNoPrependDot for readability
  • Add lua test for this new functionality

Supersedes: #11214

@expipiplus1 expipiplus1 force-pushed the vim-8.1.0251 branch 2 times, most recently from 0e085aa to 9216700 Compare October 21, 2019 07:27
@marvim marvim added the vim-patch See https://neovim.io/doc/user/dev_vimpatch.html label Oct 21, 2019
Problem:    Using a full path is supported for 'directory' but not for
            'backupdir'. (Mikolaj Machowski)
Solution:   Support 'backupdir' as well. (Christian Brabandt, closes vim/vim#179)
vim/vim@b782ba4
@justinmk
Copy link
Member

Windows build is failing, maybe fileio_spec.lua:94 is sending nil ?

Copy link
Member

@justinmk justinmk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, after Windows build is fixed

@justinmk justinmk added the needs:response waiting for reply from the author label Oct 25, 2019
@expipiplus1
Copy link
Contributor Author

I'd be very grateful if someone with a Windows machine would be able to correct this test.

@tchernomax
Copy link

I don't have windows build env available.
But I think the problem is read_file('Xtest_backupdir' .. sep .. backup_file_name) return nil so trim complain.
Can someone with windows build can build this PR, edit a file after setting set backupdir=whatever// and post the resulting backup file name here ?

@justinmk
Copy link
Member

justinmk commented Nov 18, 2019

one can debug this by adding temporary changes and observing the result on CI: 1d5c3e6

Result:

test/functional\core\fileio_spec.lua:110: Expected objects to be the same.
Passed in:
(table: 0x0cdaf498) {
  [1] = 'C:\projects\neovim'
  [2] = 'C:%projects%neovim%Xtest_startup_file1~'
  [3] = 'Xtest_backupdir\C%%projects%neovim%Xtest_startup_file1~' }
Expected:
(string) 'x'
stack traceback:
  • So it looks like the : needs to be replaced with %.
    • I pushed a commit that does so.
  • Also removed the sep stuff, because read_file works with / separators.

@justinmk justinmk removed the needs:response waiting for reply from the author label Nov 18, 2019
@justinmk
Copy link
Member

Thanks @expipiplus1

Followup

@justinmk justinmk merged commit 1ff5b60 into neovim:master Nov 18, 2019
wspurgin added a commit to wspurgin/neovim that referenced this pull request Nov 18, 2019
@expipiplus1
Copy link
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vim-patch See https://neovim.io/doc/user/dev_vimpatch.html
Projects
None yet
Development

Successfully merging this pull request may close these issues.

set backupdir does not support double trailing slashes to include path info in filename
5 participants