Bug 434052

Summary: Add variable of file path in prefix of backup file
Product: [Applications] kate Reporter: Yuki <X1353135>
Component: applicationAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED WAITINGFORINFO    
Severity: wishlist CC: christoph
Priority: NOR    
Version First Reported In: 20.12.2   
Target Milestone: ---   
Platform: unspecified   
OS: All   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Yuki 2021-03-06 09:21:51 UTC
It's more convenient if variable of file path (without drive letter on windows) is added in prefix of backup file to put it  in flexible location.

Example-----
Kate configuration =>
  Backup file prefix: C:/Backup/%{FilePath}/
  Backup file suffix: .bak
Edited file => C:/Programs/src/module1/ab.c
Expected behavior => Put backup file as C:/Backup/Programs/src/module1/ab.c.bak
Comment 1 Yuki 2021-03-07 02:51:35 UTC
>It's more convenient if variable of file path (without drive letter on windows)

I mean I would like to get base path in front of file name in file path as value of the variable.
Comment 2 Yuki 2021-06-08 23:08:35 UTC
As another idea, it may be more flexible if user can setup the back file name pattern by using variable (instead of setting up prefix and suffix) like following:

Example-----
/Backup/%{BasePath}/%{FileName}_%{Date:yyyyMMdd}-%{Time:HHmmss}.%{Extension}
Comment 3 Christoph Cullmann 2023-08-05 19:02:16 UTC
I don't think that is such a often used feature that it requires this amount of flexibility.

If you think otherwise, patches to add this are welcome, but I don't see that the team will spend work on that.

https://kate-editor.org/post/2020/2020-07-18-contributing-via-gitlab-merge-requests/