summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--library/filemanager.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/library/filemanager.cpp b/library/filemanager.cpp
index 1c1c998..c51ca2f 100644
--- a/library/filemanager.cpp
+++ b/library/filemanager.cpp
@@ -305,33 +305,32 @@ bool FileManager::copyFile( const QString & src, const QString & dest ) {
305 } 305 }
306 306
307 return success; 307 return success;
308} 308}
309 309
310 310
311bool FileManager::renameFile( const QString & src, const QString & dest ) { 311bool FileManager::renameFile( const QString & src, const QString & dest ) {
312 if(copyFile( src, dest )) { 312 if(copyFile( src, dest )) {
313 if(QFile::remove(src) ) { 313 if(QFile::remove(src) ) {
314 return true; 314 return true;
315 } 315 }
316 } 316 }
317 return false; 317 return false;
318} 318}
319 319
320 320
321=======
322bool FileManager::copyFile( const QString & src, const QString & dest ) { 321bool FileManager::copyFile( const QString & src, const QString & dest ) {
323 bool success = true; 322 bool success = true;
324 struct stat status; 323 struct stat status;
325 int read_fd=0; 324 int read_fd=0;
326 int write_fd=0; 325 int write_fd=0;
327 struct stat stat_buf; 326 struct stat stat_buf;
328 off_t offset = 0; 327 off_t offset = 0;
329 QFile srcFile(src); 328 QFile srcFile(src);
330 QFile destFile(dest); 329 QFile destFile(dest);
331 330
332 if(!srcFile.open( IO_ReadOnly|IO_Raw)) { 331 if(!srcFile.open( IO_ReadOnly|IO_Raw)) {
333 return success = false; 332 return success = false;
334 } 333 }
335 read_fd = srcFile.handle(); 334 read_fd = srcFile.handle();
336 if(read_fd != -1) { 335 if(read_fd != -1) {
337 fstat (read_fd, &stat_buf); 336 fstat (read_fd, &stat_buf);