Comments (1)
Hm, yeah, that's true. I've set all my cameras to use sequential file names (ie. don't reset the counter when the card is emptied), so all my .1 files tend to be duplicates. I haven't really considered the use case where you want to keep both versions.
I'm a bit sceptical of messing about "inside" the file names; a trailing .1 is easy to identify and remove. foo123.jpg -> foo123-A.jpg / foo123-1.jpg / foo123+1.jpg can be much harder to identify unambigously (depending on the camera naming scheme, of course). But that may be too much paranoia. I'll have to think about it for a bit.
To solve your immediate problem, the sprintf() call in RIFEC::File::_link_file() would be the place to look. For your use case, I'm guessing you could change the single sprintf() to something like this (Note: this code is NOT TESTED):
my ($base, $ending) = split /\./, $destination_name, 2;
my $newbase = sprintf("%s+%d", $base, ++$tries);
$dst = join('.', $newbase, $ending);
from rifec.
Related Issues (14)
- hangs when receiving pictures HOT 1
- implementation.pm HOT 19
- Upload Loop HOT 2
- multiple file transfer HOT 23
- Unable to compile spk HOT 11
- Leftover .rifec-receiving-xxx files safe to delete? Indication of problems? HOT 4
- "Can not handle tarballs with more than one file" HOT 2
- OSX HOT 3
- Syntax error HOT 1
- Rifec repeating file transfer HOT 1
- Transfer mode matching HOT 2
- Unstable connections HOT 2
- Getting issue on Synlogy "Make" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rifec.