Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Cloud Storage on local development Server: Invalid Filename

I am trying to "upload" a byte array to the local GAE/J (1.8.1, Eclipse Juno) development Server using Google Cloud Storage Client Library:

byte[] byteContent = new byte[] {1, 2, 3, 4, 5};
GcsFilename fileName = new GcsFilename("MyBucket", "foo");
GcsOutputChannel outputChannel =
GcsServiceFactory.createGcsService().createOrReplace(fileName, GcsFileOptions.getDefaultInstance());
outputChannel.write(ByteBuffer.wrap(byteContent));
outputChannel.close();

Attempting this, the following Exception is thrown:

WARNING: Caught IOException while attempting to write blob
java.io.FileNotFoundException: C:\dev\workspace\gaeTestProjekt\war\WEB-INF\appengine-generated\encoded_gs_key:L2dzL015QnVja2V0L2Zvbw (The filename, directory name, or volume label syntax is incorrect)

Which makes sense given the existence of an additional colon in the name of the target file (encoded_gs_key:L2dzL015QnVja2V0L2Zvbw).

Question is, how do I prevent the local development Server from attempting to create an invalid filename ?

like image 892
user2554440 Avatar asked Feb 16 '23 00:02

user2554440


2 Answers

I finally found the source of the error. If I run the development server inside a truecrypt drive the error occurs. If I run it outside the error is gone. So it seems to be a problem with how truecrypt is handling files.

like image 126
Andre Avatar answered Feb 27 '23 09:02

Andre


I think your best bet is to maybe dig around here enable file name character translation

like image 33
wonderwall Avatar answered Feb 27 '23 11:02

wonderwall