summaryrefslogtreecommitdiff
authorzecke <zecke>2003-02-16 21:01:09 (UTC)
committer zecke <zecke>2003-02-16 21:01:09 (UTC)
commit892a453a931b41967c7dca72097da9c5be7f84d6 (patch) (side-by-side diff)
treec687518f02064dd5d7c94f57e519243dd3ea5dfe
parent64178d4839f12540b8a3d19cf79c9c2b1d33707e (diff)
downloadopie-892a453a931b41967c7dca72097da9c5be7f84d6.zip
opie-892a453a931b41967c7dca72097da9c5be7f84d6.tar.gz
opie-892a453a931b41967c7dca72097da9c5be7f84d6.tar.bz2
its memcpy(destination, src
and not vice versa....
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/obex/receiver.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/core/obex/receiver.cpp b/core/obex/receiver.cpp
index d5a7271..31c6afe 100644
--- a/core/obex/receiver.cpp
+++ b/core/obex/receiver.cpp
@@ -139,3 +139,3 @@ QString OtherHandler::targetName( const QString& file ) {
int trie = 0;
- while (QFile::exists(newFile + info.extension() ) ) {
+ while (QFile::exists(newFile + "."+info.extension() ) ) {
newFile = newFileBase + "_"+QString::number(trie) ;
@@ -143,3 +143,3 @@ QString OtherHandler::targetName( const QString& file ) {
}
- newFile += info.extension();
+ newFile += "." + info.extension();
@@ -150,2 +150,3 @@ QString OtherHandler::targetName( const QString& file ) {
void OtherHandler::copy(const QString& src, const QString& file) {
+ qWarning("src %s, dest %s", src.latin1(),file.latin1() );
int src_fd = ::open( QFile::encodeName( src ), O_RDONLY );
@@ -157,2 +158,3 @@ void OtherHandler::copy(const QString& src, const QString& file) {
::lseek(to_fd, stater.st_size-1, SEEK_SET );
+ ::write(to_fd, "", 1 );
@@ -164,3 +166,3 @@ void OtherHandler::copy(const QString& src, const QString& file) {
- ::memcpy(src_addr , dest_addr, stater.st_size );
+ ::memcpy(dest_addr , src_addr, stater.st_size );
::munmap(src_addr , stater.st_size );