diff options
author | dllud | 2018-12-30 06:50:18 +0000 |
---|---|---|
committer | dllud | 2018-12-30 06:50:18 +0000 |
commit | 16b2e7515e317ffe97861bd296337f0e6a3e8edc (patch) | |
tree | 740e8407ec01ce799bbdca64608ba200970bdb4c /do-not-replace-dots.patch | |
parent | 440e1ff6760dbe6e8abddb7c0196f29c6129a7fa (diff) | |
download | aur-16b2e7515e317ffe97861bd296337f0e6a3e8edc.tar.gz |
Patched to avoid dot replacement by underscore.
Diffstat (limited to 'do-not-replace-dots.patch')
-rw-r--r-- | do-not-replace-dots.patch | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/do-not-replace-dots.patch b/do-not-replace-dots.patch new file mode 100644 index 000000000000..0339f76933db --- /dev/null +++ b/do-not-replace-dots.patch @@ -0,0 +1,19 @@ +diff --git a/setfname.cpp b/setfname.cpp +index 6eac756..5ae89e1 100644 +--- a/setfname.cpp ++++ b/setfname.cpp +@@ -65,14 +65,8 @@ bool file::vmodify(const char* fname, const function& edit) const + } + + string name = edited; +- int dot = 1; + for(string::iterator p = name.end()-1; p != name.begin()-1; --p) { + if(!portable_fn(*p)) *p = '_'; // replace ill. chars +- if(*p == '.') { +- if(dot-- <= 0) { +- *p = '_'; +- } +- } + } + if(const char* psep = strrchr(fname, '/')) { + name.insert(0, fname, psep-fname+1); // copy path prefix |