openbsd-ports/sysutils/krename/patches/patch-krename_batchrenamer_cpp
ajacoutot bc00709531 Import krename-3.0.14
KRename is a powerful batch renamer for KDE.  It allows you to easily
rename hundreds or even more files in one go.  The filenames can be
created by parts of the original filename, numbering the files or
accessing hundreds of informations about the file, like creation date or
Exif informations of an image, thanks to KDE file plugins.


Based on a submission by Vadim Zhukov
<persgray at gmail dot com> (MAINTAINER)
2008-02-15 12:33:10 +00:00

26 lines
1.4 KiB
Plaintext

$OpenBSD: patch-krename_batchrenamer_cpp,v 1.1.1.1 2008/02/15 12:33:10 ajacoutot Exp $
--- krename/batchrenamer.cpp.orig Mon Jan 8 12:29:53 2007
+++ krename/batchrenamer.cpp Fri Feb 15 10:17:49 2008
@@ -312,9 +312,9 @@ void BatchRenamer::work( ProgressDialog* p )
if( undo )
if( dst.isLocalFile() && src.isLocalFile() ) {
// Plugins ???
- (*tundo) << "echo \"" << src.fileName()
- << " -> " << dst.fileName() << "\"" << endl;
- (*tundo) << "mv --force -b --suffix=.krename_ \"" << m_files[i].dst.name
+ (*tundo) << "echo \"" << dst.fileName()
+ << " -> " << src.fileName() << "\"" << endl;
+ (*tundo) << "mv -f \"" << m_files[i].dst.name
<< "\" \"" << m_files[i].src.name << "\"" << endl;
} else
p->warning( QString( i18n("Undo is not possible for remote file: %1") ).arg( dst.prettyURL() ) );
@@ -855,7 +855,7 @@ QString BatchRenamer::doReplace( QString text, QString
void BatchRenamer::writeUndoScript( QTextStream* t )
{
// write header comments
- (*t) << "#!/bin/bash" << endl
+ (*t) << "#!/bin/sh" << endl
<< "# KRename Undo Script" << endl << "#" << endl
<< "# KRename was written by:" << endl
<< "# Dominik Seichter <domseichter@web.de>" << endl