In GDrive, filenames aren't unique, and directories are just
special files - so you can have multiple files with the same
name, multiple directories with the same name, and even files
with the same names as directories.
OC doesn't handle this at all, though, and just wants to act
as if file and directory names *are* unique. So when renaming,
we must check if there's an existing object with the same
file or directory name before we commit the rename, and
explicitly delete it if the rename is successful. (Other
providers like dropbox do the same for files, but intentionally
don't do it for directories; we really need to do it for
directories too.)
A good way to observe this is to run the storage unit tests
and look at the state of the Drive afterwards. Without this
commit, there will be several copies of all the test files
and directories. After this commit, there's just one of each.
We can't just say "hey, Drive lets us do this, what's the
problem?" because we don't handle multiple-objects, same-name
cases - getDriveFile() just bails and prints an error if it
searches for the file or directory with a given name and gets
multiple results.
Sometimes there are bugs that cause setupFS() to be called for
non-existing users. Instead of failing hard and breaking the instance,
this fix simply logs a warning.
ownCloud passes us a Unix time integer, but the GDrive API wants
an RFC3339-formatted date. Actually it wants a single particular
RFC3339 format, not just anything that complies will do - it
requires the fractions to be specified, though RFC3339 doesn't.
This resolves issue #11267 (and was also noted by PVince81 in
reviewing PR #6989).
This is a slightly hacky workaround for
https://github.com/google/google-api-php-client/issues/59 .
There's a bug in the Google library which makes it go nuts on
file uploads and transfer *way* too much data if compression is
enabled and it's using its own IO handler (not curl). Upstream
'fixed' this (by disabling compression) for one upload
mechanism, but not for the one we use. The bug doesn't seem to
happen if the google lib detects that curl is available and
decides to use it instead of its own handler. So, let's disable
compression, but only if it looks like the Google lib's check
for curl is going to fail.
Latest version with various bugfixes, also implements support
for using curl instead of its own io class when available; this
avoids the bug that causes severe excess bandwidth use due to
some kind of zlib issue.
This is the upstream commit that merged my query separator fix. It's slightly
after the 1.0.3-beta tag. I eyeballed the other post 1.0.3-beta changes and
none of them looks like any kind of problem, so we may as well just use this
upstream state.
We need to do this in order to be able to refresh the access token without
prompting the user for their credentials every hour. This was the default
in 0.6 of the Google library, but needs to be explicitly specified in 1.0.
Submitted upstream as https://github.com/google/google-api-php-client/issues/76
Google's php lib has a function to generate a URL for OAuth2 authentication.
It uses http_build_query() to generate the query part of the URL, and in PHP
5.3 or later, this uses an encoded ampersand - & - as the query separator,
not a raw one. However, Google's OAuth server apparently can't handle encoded
ampersands as separators and so it fails.
This patch explicitly sets a raw ampersand as the separator. If Google decides
to fix their OAuth server instead of merging this patch into google-api-php-
client, we can drop this patch as soon as that happens.
Added addTranslations and fixed de.js file
Fixed de.js to use OC.L10N.register() and use to correct expected
format.
Added JS unit tests for OC.L10N class
Include translations JS script for all apps
filter installed and not-installed apps properly
kill unneeded file
load category 'Installed' on page load
adding documentation links
new apps mgmt: first style adjustment
apps mgmt: only show license and preview if they exist
adding buttons
new apps mgmt: fix for mobile
use app icon if available
new apps mgmt: position enable/disable toggle to the right
new apps mgmt: proper display of icons or previews
new apps mgmt: fix loading spinner
reenable group selection for apps
new apps mgmt: position enable button normally again
new apps mgmt: clarify wording from 'Installed' to 'Enabled'
reintroduce enable/disable
Move rating image path generation to client-side
Move expression outside of l10n
fix group handling
add buttons for 'More apps' and 'Add your app' again
disable changed date of app for now
adding recommended label
style 'Recommended' app tag
fixing php warning
sort by rating
adding meta-category 'Recommended'
Only show existing documentation links
lacy loading of screenshots
making group based app activation work again
adding support to get the app icon not only by the app name but also simply by the fixed name 'app.svg'
adding app.svg for all core apps
query string '?installed' is not longer needed
update and uninstall is back + error feedback
remove unneeded parameter
fix alignment of 'recommended' label
Allow specifying a protocol in the host field when mounting another
ownCloud instance. Note that this was already possible with the WebDAV
config but this bug made it inconsistent.
folder size and mtime is always unknown in s3
more s3 fixes
make rescanDelay of root dir configurable, add on the fly update of legacy storage ids, !isset -> empty when checking strings
reduce number of http calls on remove and rmdir
fix typo
* Highlight fields that need to be filled
* Remove (required) and (optional) strings where possible
* Focus first configuration field when creating new external storage
* Add ability to force external storage re-check
* Various jQuery improvements
* Prevent wrapping of checkboxes in configuration
maintain deprecated \OC::$session when getting or setting the session via the server container or UserSession
restore order os OC::$session and OC::$CLI
remove unneded initialization of dummy session
write back session when $useCustomSession is true
log warning when deprecated app is used
remove minified select2 js
show avatars for users, simpler results
remove unneeded users and groups from settings template
fix css, escape user and group names
As constants not defined within a class cannot be automatically found by the
autoloader moving those constants into a class makes them accessible to
code which uses them.
Signed-off-by: Stephan Peijnik <speijnik@anexia-it.com>
For external storage with lots of parameter settings (>4), wrap the content of the cell to let a full view of the parameters.
The rows of the table are now always visible until the end (the trash icon is accessible).
(Note : A strange 3px margin forces me to add a class on the row added by javascript, to be able to align them with the rows rendered by the server.)
Added mountType attribute for files/folder to indicated whether they are
regular, external or shared.
The client side then adapts the "Delete" action hint text based on this
information.
Only the mount roots must have the delete icon hint adapted.
To make this detectable on the client side, the mountType can now
be null, "shared", "shared-root", "external" or "external-root".
This also gives room to icon customization on the client side.
For some reason the aws-sdk-php package does not caclulate the
signiture correctly when accessing an object in a bucket with a name of
'.'.
When we are at the top of a S3 bucket there is a need(?) to have a directory
name. Per standard Unix the name picked was '.' (dot or period). This
choice exercises the aws-sdk bug.
This fix is to add a field to the method to store the name to use instead of
'.' which at this point is hard coded to '<root>'. We also add a private
function 'cleanKey()' which will test for the '.' name and replace it with
the variable. Finally all calls to manipulate objects where the path is
not obviously not '.' are processed through cleanKey().
An example where we don't process through clean key would be
'Key' => $path.'/',
Use correct relationship operator
Per feed back use === instead of ==
use '/' instead of '<root>'