summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfmMenu.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp
index d34f330..4628170 100644
--- a/noncore/apps/advancedfm/advancedfmMenu.cpp
+++ b/noncore/apps/advancedfm/advancedfmMenu.cpp
@@ -540,50 +540,50 @@ bool AdvancedFm::copyFile( const QString & src, const QString & dest ) {
540 } 540 }
541 write_fd = destFile.handle(); 541 write_fd = destFile.handle();
542 if(write_fd != -1) { 542 if(write_fd != -1) {
543 err = sendfile(write_fd, read_fd, &offset, stat_buf.st_size); 543 err = sendfile(write_fd, read_fd, &offset, stat_buf.st_size);
544 if( err == -1) { 544 if( err == -1) {
545 QString msg; 545 QString msg;
546 switch(err) { 546 switch(err) {
547 case EBADF : msg = "The input file was not opened for reading or the output file was not opened for writing. "; 547 case EBADF : msg = "The input file was not opened for reading or the output file was not opened for writing. ";
548 case EINVAL: msg = "Descriptor is not valid or locked. "; 548 case EINVAL: msg = "Descriptor is not valid or locked. ";
549 case ENOMEM: msg = "Insufficient memory to read from in_fd."; 549 case ENOMEM: msg = "Insufficient memory to read from in_fd.";
550 case EIO: msg = "Unspecified error while reading from in_fd."; 550 case EIO: msg = "Unspecified error while reading from in_fd.";
551 }; 551 };
552 success = false; 552 success = false;
553// owarn << msg << oendl; 553// owarn << msg << oendl;
554 } 554 }
555 } else { 555 } else {
556 success = false; 556 success = false;
557 } 557 }
558 } else { 558 } else {
559 success = false; 559 success = false;
560 } 560 }
561 srcFile.close(); 561 srcFile.close();
562 destFile.close(); 562 destFile.close();
563 // Set file permissions 563 // Set file permissions
564 if( stat( (const char *) src, &status ) == 0 ) { 564 if( stat( QFile::encodeName(src), &status ) == 0 ) {
565 chmod( (const char *) dest, status.st_mode ); 565 chmod( QFile::encodeName(dest), status.st_mode );
566 } 566 }
567 567
568 return success; 568 return success;
569} 569}
570 570
571void AdvancedFm::runCommand() { 571void AdvancedFm::runCommand() {
572 if( !CurrentView()->currentItem()) return; 572 if( !CurrentView()->currentItem()) return;
573 QDir *thisDir = CurrentDir(); 573 QDir *thisDir = CurrentDir();
574 574
575 QString curFile; 575 QString curFile;
576 curFile = thisDir->canonicalPath() +"/"+ CurrentView()->currentItem()->text(0); 576 curFile = thisDir->canonicalPath() +"/"+ CurrentView()->currentItem()->text(0);
577 577
578 InputDialog *fileDlg; 578 InputDialog *fileDlg;
579 fileDlg = new InputDialog(this,tr("Run Command"),TRUE, 0); 579 fileDlg = new InputDialog(this,tr("Run Command"),TRUE, 0);
580 fileDlg->setInputText(curFile); 580 fileDlg->setInputText(curFile);
581 fileDlg->exec(); 581 fileDlg->exec();
582 //QString command; 582 //QString command;
583 583
584 if( fileDlg->result() == 1 ) { 584 if( fileDlg->result() == 1 ) {
585// odebug << fileDlg->LineEdit1->text() << oendl; 585// odebug << fileDlg->LineEdit1->text() << oendl;
586 QStringList command; 586 QStringList command;
587 587
588 command << "/bin/sh"; 588 command << "/bin/sh";
589 command << "-c"; 589 command << "-c";