Comments (12)
Hi @nkrabben
I am curious, what kind of files are you trying to bag that contain \r?
from bagger.
Could you also provide a sample file or a set of directions to reproduce the issue?
from bagger.
The files are Mac Icon files from a born-digital collection that we're processing.
Apparently, it's fairly common for their file names to end with \r although from the sample we're looking at, it's not consistent. Since it's a problem with the file name and not the content, I've been creating test files through bash.
touch "Icon^M"
from bagger.
Looks like this is due to the underlying bagit-java library which should be percent encoding the filename and decoding it when verifying. See LibraryOfCongress/bagit-java#51
from bagger.
@nkrabben take a look at https://github.com/LibraryOfCongress/bagger/releases/tag/v2.7.1 it should fix your problem.
from bagger.
Bagger 2.7.1 is crashing before it finishes loading. I get a few different errors.
Loading from the command line I get
Error: Could not find or load main class 2.
Loading from Finder I get
An illegal state occured.
I can still load 2.7.0
from bagger.
Sorry, I was impatient and built it without all the dependencies. I deleted the old version on the releases page and uploaded the new file. I also included the MD5 and SHA1 checksum so you can test and make sure you have the right version.
from bagger.
New error
Could not find or load main class 3
from bagger.
Really? I just tried running it and it was fine. Did you delete the old one? Could you add the log files so I can see exactly what happened?
from bagger.
Looks like it was my error. Deleted everything and Bagger loaded fine.
While testing the filename handling, I noticed a new edge case. Bagging a folder that contains "Icon\r" works as expected, but adding "Icon\r" directly to the payload gives the following error:
Error adding bag file: ~/Desktop/Icon
due to:
Can't read ~/Desktop/Icon
from bagger.
It looks like it is a bug in the JDK rt.jar supplied code. Specifically BasicFileChooserUI's inner class ApproveSelectionAction. The code is repeated here for easy viewing:
if (filename != null) {
// Remove whitespaces from end of filename
int i = filename.length() - 1;
while (i >=0 && filename.charAt(i) <= ' ') {
i--;
}
filename = filename.substring(0, i + 1);
}
This code as the comment suggests removes any whitespace at the end of a file name. In this case that is not the correct behavior. I will try and file a bug with the Java developers and post a link here.
from bagger.
Oracle has created a bug based on my report
http://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8160540
from bagger.
Related Issues (20)
- Bagger fails to start if parent directory has spaces (Windows) HOT 3
- Version 2.7.7 fails to start HOT 1
- Difference in validation status of bag using Python and Java versions HOT 4
- Uncaught Exception Handler HOT 7
- Unexplained error message HOT 5
- Save errors when not using browse button
- Feature Request: some kind of progress indication while bagging
- Deletion of tagmanifest-md5.txt does not invalidate Bag HOT 3
- update bagger install documentation
- False error message reported after saving zipped bag HOT 5
- Bagger chokes when writing a bag - perhaps bag size or file path length? HOT 1
- reopening a bag changes the order of key:value pairs defined in the json profile HOT 3
- Checksum types HOT 1
- Bagger creates a data subdirectory HOT 2
- Mac Alias files
- Error: trying to save bag HOT 3
- Hidden files being copied in version 2.8.1 HOT 1
- Bagger Software to support BagIt v1.0
- Problem with JSON metadata profile HOT 4
- Bag Info fields jumbled after Bagging completed 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 bagger.