#519552 obexpushd: send failed when I try to send same file

Package:
obexpushd
Source:
obexpushd
Description:
program for receiving files via Bluetooth or IRDA
Submitter:
Pol Hallen
Date:
2010-06-18 00:51:03 UTC
Severity:
normal
#519552#5
Date:
2009-03-13 12:20:35 UTC
From:
To:
Hi,
I'm not sure if this is really a bug.
If I try to send same file 2 times obexpushd refuses of receives the file (0.1: Error: cannot create file: File
exists)

[...]
Connection from "bluetooth/[00:1F:00:BB:1C:BA]:9"
0: OBEX_EV_REQHINT, OBEX_CMD_CONNECT
0: OBEX_EV_REQ, OBEX_CMD_CONNECT
0: OBEX_EV_REQDONE, OBEX_CMD_CONNECT
0: OBEX_EV_REQHINT, OBEX_CMD_PUT
0: OBEX_EV_REQCHECK, OBEX_CMD_PUT
0.1: Got header 0x01 with value length 50
0.1: name: "Il lato migliore del.txt"
0.1: Got header 0xc3 with value length 4
0.1: size: 124 bytes
0.1: Got header 0x42 with value length 11
0.1: type: "text/plain"
0.1: Got header 0x44 with value length 16
0.1: Creating file "Il lato migliore del.txt"
0.1: Error: cannot create file: File exists
0: OBEX_EV_REQDONE, OBEX_CMD_PUT
0: OBEX_EV_LINKERR, OBEX_CMD_CONNECT
[...]

is there a way to resolve this problem?

Thanks
Pol

#519552#10
Date:
2009-04-08 18:21:40 UTC
From:
To:
Hi,
[...]
There is also no clear method how to do this:
1. add a random postfix to the filename -> changes file suffix and may give
problems when wanting to open the file
2. allow overwriting files -> data of previous file lost

Some clients can differ between local and remote filename.

Maybe you have some idea on how to solve this.

HS

#519552#15
Date:
2010-06-18 00:46:41 UTC
From:
To:
Hi Hendrik,

I'm for option #1 not with random suffix but a sequential one:

If "Il lato migliore del.txt" file already exists, it will create "Il
lato migliore del.txt.1".
If "Il lato migliore del.txt.1" exists, create ".2", etc...
Successful transfer and no data loss.
If file already exists, you will have to choose which one you prefer
unless you will need both.

Cheers,
Gabriele