ECToo / cryptsync

Automatically exported from code.google.com/p/cryptsync
1 stars 0 forks source link

when encrypting archive filenames encrypted folder/filename path very often too long for Windows #138

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

Firstlythanks for the effort in doing CryptSync its a really useful program 
with bags of potential for TNO (Trust Noone) utility  

I have a couple of issues with CryptSync when you encrypt the archive name.

1. it would be really useful to be able NOT to encrypt folder names (by folder 
names i mean folders of archives) as if you ever need to use 7zip on its own to 
decrypt you are screwed as you will loose folder names (solely a cryptsync 
creation) .. personally hiding archive name and content file names is essential 
but folder names not that useful

2. The huge issue i have with CryptSync is that when it encrypts the archive 
filenames then invariably the long encrypted filename plus pathlength > windows 
limit which makes CryptSync pretty much useless.

SOLUTIONS:
----------
1. It would be great if you could optionally switch off just folder name 
encryption

2. I dont really see the point in going to all the trouble of encrypting the 
archive filename and running in to the windows filename/path character limit so 
often ... Why not simply use a sequential counter and allocate the sequential 
number to be the filename ... when Cryptsync or 7Zip unexpands/decrypts the 
files it will get its original filename back anyway.  With just a number the 
archive filenames are going to always be less than the windows file/path legth 
limit

I put together a rough CMD script to illustrate this which works fine .... this 
is fine for one off jobs but you really need something like CryptSync for 
incremental updates to the cloud drive (otherwise you will be uploading the 
complete backup every week :-((

Fingers x for at least the archive filename/path issue to be dealt with   

best regards

ian

SETLOCAL ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
SET /A COUNT=0
FOR /D /r %%F in ("*") DO (
    pushd %CD%
    cd %%F
        FOR %%X in (*.*) DO (
        SET /A COUNT+=1
        REM ECHO !COUNT!
                REM ENCRYPT SEQUENTIALLY RENAME FILE
        "C:\Program Files\7-zip\7z.exe" a -t7z -r -mx3 -pdog -mhe=on !COUNT!.7z "%%X"
            REM DELETE SOURCE FILE
        DEL /F /S /Q /A "%%X"
        )
    popd
)

Original issue reported on code.google.com by beckett....@gmail.com on 26 Feb 2015 at 4:38