Mkdir on b2: consider adding some output?

I was surprised to find that rclone mkdir was doing nothing on a b2 remote. Then I read this in the forum. Any chance rclone could issue a message of some sort to tell the user what is going on after she issues a fruitless rlcone mkdir command? I had a problem with my scripts and the mkdir oddity contributed to my making the misdiagnosis that somehow my remote had become inaccessible.

i am able to create folders on b2.
what version of rclone are you running?

rclone.exe lsd b201: 

rclone.exe mkdir b201:thisisanewfolder 

rclone.exe lsd b201: 
          -1 2020-07-06 09:22:22        -1 thisisanewfolder

rclone mkdir b2:bucket will make a bucket so rclone really does something here.

We could make the rclone mkdir command issue a DEBUG (visible with -vv) or INFO (visible with -v) or NOTICE (always visible unless you use -q) log when used on a BucketBased remote that mkdir is not doing anything.

Would you have noticed a DEBUG/INFO/NOTICE message?

Are you creating a new 'bucket' here? If so, then, as NCW says, that does work. But making other directories does not work. (EDITED.)

I am using rclone 1.52.2.

Thanks.

I tested with the rcloneBrowser program and with a terminal, i.e. with unscripted bash. I am unsure what messages the former will show. The terminal would have shown a message of the 'NOTICE' type, I think - and so I would have, er, noticed that.

@ncw is correct, as almost always

the concept of empty folders is a problem for many backends.
nothing to do with rclone itself.

no worries,
we are testing a new flag
--magic :upside_down_face:

1 Like

I haven't implemented that yet, I just wanted your opinion on what level warning rclone should emit before I do!

Yes, I know. I was telling you - as requested - what I would have noticed, were it to have been present. :smile:

:smiley:

OK I've given it a go - can you try this and tell me what you think!

v1.52.2-207-g0a339bce-fix-mkdir-warning-beta on branch fix-mkdir-warning (uploaded in 15-30 mins)

Thanks Nick, but those links are either leading nowhere or throwing errors.

Sorry failed to push the branch. Here it is again

v1.52.2-207-g0a339bce-fix-mkdir-warning-beta on branch fix-mkdir-warning (uploaded in 15-30 mins)

Good - well, bad - old 'GDebi' has given one of its incomprehensible error messages:

(Still, Mint 20, which I will upgrade to soon, has overhauled GDebi.)

Yet, the page you linked has a Zip file. I have downloaded it. What do I do with it? I'd run its 'rclone' file, but what is that 'rclone.1' file it contains? Note also that my normal way of updating Rclone is to use a script I wrote that: downloads rclone via curl; unzips it; copies it to /usr/bin/rclone.

rclone is just a file, does not need to be installed.
since you already have a file named rclone, rename the beta version of rclone to something like rclonebeta.
then run your test command
rclonebeta mkdir b2:bucket -vv

Here is what I get.

$ rclone mkdir enc-b2:/x1/test
2020/07/08 17:02:05 NOTICE: Encrypted drive 'enc-b2:/x1/test': Warning: running mkdir on a remote which can't have empty directories does nothing

That output is good - it is the sort of output I want.

I hope I got the syntax of the command right. (I run rclone backups via scripts I wrote and I no longer understand well how they work and I tend not run rclone manually.) I have a b2 remote, which is encrypted, called 'enc-b2'. A top-level folder therein is called 'x1'.

Rclone-browser's mkdir function does not seem to show the output anywhere. But I suppose that is not rclone's fault.

Also:

$ rclone mkdir enc-b2:/x1/test -vv
2020/07/08 17:05:15 DEBUG : rclone: Version "v1.52.2-207-g0a339bce-fix-mkdir-warning-beta" starting with parameters ["rclone" "mkdir" "enc-b2:/x1/test" "-vv"]
2020/07/08 17:05:15 DEBUG : Using config file from "/home/<my user>/.config/rclone/rclone.conf"
2020/07/08 17:05:17 NOTICE: Encrypted drive 'enc-b2:/x1/test': Warning: running mkdir on a remote which can't have empty directories does nothing
2020/07/08 17:05:17 DEBUG : Encrypted drive 'enc-b2:/x1/test': Making directory
2020/07/08 17:05:17 DEBUG : 6 go routines active

That is logged at a different level, alas, I think we'll have to live with that!

I've merged this to master now which means it will be in the latest beta in 15-30 mins and released in v1.53

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.