Comparar commits

..

12 Commits

Autor SHA1 Mensagem Data
Mark Barnard f380852986 Adding thumbs.db 2014-06-12 13:20:59 -04:00
Mark Barnard d13ac31e08 Adding images
Adding screen captures for installation instructions.
2014-06-12 13:10:44 -04:00
Jenkins for ownCloud 3f543b881d [tx-robot] updated from transifex 2014-06-11 02:06:11 -04:00
Jenkins for ownCloud 4a1d0eb80e [tx-robot] updated from transifex 2014-06-11 01:25:22 -04:00
Klaas Freitag 760ecd71fc Theme: Show the stringified app version rather than the major version.
This was a regression, we changed that by accident in 1.6.0.
2014-06-10 13:48:27 +02:00
Jenkins for ownCloud 04f1026cd8 [tx-robot] updated from transifex 2014-06-10 01:25:24 -04:00
Jenkins for ownCloud b03c4cc62e [tx-robot] updated from transifex 2014-06-08 01:25:21 -04:00
Jenkins for ownCloud e497b6d458 [tx-robot] updated from transifex 2014-06-07 02:06:12 -04:00
Jenkins for ownCloud 2e4320ee05 [tx-robot] updated from transifex 2014-06-07 01:25:22 -04:00
Klaas Freitag 14a5ff6747 overlayIcons: First version of the nautilus overlay python module 2014-06-06 17:49:19 +02:00
Olivier Goffart abf0f90a13 SocketAPI: broadcast change when an item is done 2014-06-06 15:52:55 +02:00
Klaas Freitag 4d5c74c019 SocketAPI: Add another API call for stat of file and folder separately. 2014-06-06 15:38:20 +02:00
165 arquivos alterados com 1503 adições e 4123 exclusões
-35
Ver Arquivo
@@ -1,40 +1,5 @@
ChangeLog
=========
version 1.6.2 (release 2014-07-x )
* Another small mem leak fixed in HTTP Credentials.
* Fix local file name clash detection for MacOSX.
* Limit maximum wait time to ten seconds in network limiting.
* Fix data corruption while trying to resume and the server does
not support it.
* HTTP Credentials: Read password from legacy place if not found.
* Shibboleth: Fix the waiting curser that would not disapear (#1915)
* Limit memory usage to avoid mem wasting and crashes
* Propagator: Fix crash when logging out during upload (#1957)
* Propagator_qnam: Fix signal slot connection (#1963)
* Use more elaborated way to detect that the server was reconfigured (#1948)
* Setup Wizard: Reconfigure Server also if local path was changed (#1948)
version 1.6.1 (release 2014-06-26 )
* Fix 'precondition failed' bug with broken upload
* Fix openSSL problems for windows deployment
* Fix syncing a folder with '#' in the name
* Fix #1845: do not update parent directory etag before sub
directories are removed
* Fix reappearing directories if dirs are removed during its
upload
* Fix app version in settings dialog, General tab
* Fix crash in FolderWizard when going offline
* Shibboleth fixes
* More specific error messages (file remove during upload, open
local sync file)
* Use QSet rather than QHash in SyncEngine (save memory)
* Fix some memory leaks
* Fix some thread race problems, ie. wait for neon thread to finish
before the propagator is shut down
* Fix a lot of issues and warnings found by Coverity
* Fix Mac some settings dialog problems
version 1.6.0 (release 2014-05-30 )
* Minor GUI improvements
* Qt5 compile issues fixed
+9 -9
Ver Arquivo
@@ -1,28 +1,37 @@
# Auto-generated - do not modify
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Näytä julkaisutiedot"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Havaittiin sovelluksen ${APPLICATION_EXECUTABLE} prosessi (tai prosesseja) jotka pitäisi pysäyttää.\nHaluatko että asennusohjelma pysäyttää nämä puolestasi?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Pysäytetään sovelluksen ${APPLICATION_EXECUTABLE} prosessit."
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Tapettavaa prosessia ei löytynyt!"
StrCpy $PageReinstall_NEW_Field_1 "Vanhempi versio sovelluksesta ${APPLICATION_NAME} on jo asennettu. On suositeltavaa että poistat vanhan asennuksen ensin. Valitse mikä toiminto suoritetaan ja napsauta Seuraava jatkaaksesi."
StrCpy $PageReinstall_NEW_Field_2 "Poista ennen asentamista"
StrCpy $PageReinstall_NEW_Field_3 "Älä poista"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "Asennettu jo"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE "Valitse miten ${APPLICATION_NAME} asennetaan."
StrCpy $PageReinstall_OLD_Field_1 "Uudempi versio sovelluksesta ${APPLICATION_NAME} on jo asennettu! Vanhan version asennus ei ole suositeltavaa. Jos todella haluat asentaa vanhemman version, kannattaa poistaa nykyisen version asennus ensin. Valitse minkä toimenpiteen haluat suorittaa ja paina Seuraava jatkaaksesi."
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} on jo asennettu.\nValitse suoritettava toimenpide ja napsauta Seuraava jatkaaksesi."
StrCpy $PageReinstall_SAME_Field_2 "Lisää/uudelleenasenna komponentteja"
StrCpy $PageReinstall_SAME_Field_3 "Poista ${APPLICATION_NAME}"
StrCpy $UNINSTALLER_APPDATA_TITLE "Poista ${APPLICATION_NAME}"
StrCpy $PageReinstall_SAME_MUI_HEADER_TEXT_SUBTITLE "Valitse suoritettava huoltotoimenpide."
StrCpy $SEC_APPLICATION_DETAILS "Asennetaan sovelluksen ${APPLICATION_NAME} välttämättömyyksiä."
StrCpy $OPTION_SECTION_SC_START_MENU_SECTION "Käynnistä-valikon pikakuvake"
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "Lisätään ${APPLICATION_NAME}-pikakuvake Käynnistä-valikkoon."
StrCpy $OPTION_SECTION_SC_DESKTOP_SECTION "Työpöydän pikakuvake"
StrCpy $OPTION_SECTION_SC_DESKTOP_DetailPrint "Luodaan työpöydän pikakuvakkeet"
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_SECTION "Pikakäynnistyksen pikakuvake"
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_DetailPrint "Luodaan pikakuvaketta pikakäynnistykseen"
StrCpy $OPTION_SECTION_SC_APPLICATION_Desc "${APPLICATION_NAME} välttämättömyydet."
StrCpy $OPTION_SECTION_SC_START_MENU_Desc "${APPLICATION_NAME}-pikakuvake."
StrCpy $OPTION_SECTION_SC_DESKTOP_Desc "Sovelluksen ${APPLICATION_NAME} työpyötäpikakuvake."
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_Desc "Pikakäynnistyksen pikakuvake sovellukselle ${APPLICATION_NAME}."
StrCpy $UNINSTALLER_APPDATA_SUBTITLE "Poista ${APPLICATION_NAME}-datakansio tietokoneelta."
StrCpy $UNINSTALLER_APPDATA_LABEL_1 "Haluatko varmasti poistaa ${APPLICATION_NAME}-datakansion?"
StrCpy $UNINSTALLER_APPDATA_LABEL_2 "Jätä valinta ruksimatta säilyttääksesti datakansion myöhempää käyttöä varten tai täytä ruksi jos haluat poistaa datakansion ja siinä olevat tiedostot."
StrCpy $UNINSTALLER_APPDATA_CHECKBOX "Kyllä, poista tämä datakansio."
StrCpy $UNINSTALLER_REGISTRY_Detail "Kirjoitetaan asennusohjelman rekisteriavaimia"
StrCpy $UNINSTALLER_FINISHED_Detail "Valmis"
StrCpy $UNINSTALL_MESSAGEBOX "Vaikuttaa siltä että sovellus ${APPLICATION_NAME} on asennettu kansioon '$INSTDIR'.\n\nHaluatko jatkaa tästä huolimatta (ei suositeltavaa)?"
StrCpy $UNINSTALL_ABORT "Poistaminen keskeytettiin käyttäjän toimesta"
StrCpy $INIT_NO_DESKTOP "Työpöydän pikakuvake (korvaa nykyinen)"
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "Tämä asennusohjelma vaatii ylläpitäjän oikeudet, yritä uudelleen."
@@ -30,15 +39,6 @@ StrCpy $INIT_INSTALLER_RUNNING "Asennusohjelma on jo k
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "Tämä poisto-ohjelma vaatii ylläpitäjän oikeudet, yritä uudelleen."
StrCpy $INIT_UNINSTALLER_RUNNING "Poisto-ohjelma on jo käynnissä."
StrCpy $SectionGroup_Shortcuts "Pikakuvakkeet"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Found ${APPLICATION_EXECUTABLE} process(s) which need to be stopped.$\nDo you want the installer to stop these for you?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Killing ${APPLICATION_EXECUTABLE} processes."
StrCpy $PageReinstall_NEW_Field_1 "An older version of ${APPLICATION_NAME} is installed on your system. It is recommended that you uninstall the current version before installing. Select the operation you want to perform and click Next to continue."
StrCpy $PageReinstall_OLD_Field_1 "A newer version of ${APPLICATION_NAME} is already installed! It is not recommended that you install an older version. If you really want to install this older version, it is better to uninstall the current version first. Select the operation you want to perform and click Next to continue."
StrCpy $PageReinstall_SAME_Field_2 "Add/Reinstall components"
StrCpy $SEC_APPLICATION_DETAILS "Installing ${APPLICATION_NAME} essentials."
StrCpy $OPTION_SECTION_SC_APPLICATION_Desc "${APPLICATION_NAME} essentials."
StrCpy $UNINSTALLER_APPDATA_LABEL_2 "Leave unchecked to keep the data folder for later use or check to delete the data folder."
StrCpy $UNINSTALLER_FILE_Detail "Writing Uninstaller"
StrCpy $UNINSTALL_MESSAGEBOX "It does not appear that ${APPLICATION_NAME} is installed in the directory '$INSTDIR'.$\r$\nContinue anyway (not recommended)?"
StrCpy $INIT_NO_QUICK_LAUNCH "Quick Launch Shortcut (N/A)"
StrCpy $UAC_ERROR_ELEVATE "Unable to elevate, error:"
+1 -1
Ver Arquivo
@@ -7,7 +7,7 @@ StrCpy $PageReinstall_NEW_Field_2 "在安装前先卸载"
StrCpy $PageReinstall_NEW_Field_3 "不要卸载"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "已经安装"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE "选择如何安装${APPLICATION_NAME}。"
StrCpy $PageReinstall_SAME_Field_2 "加/重装组件"
StrCpy $PageReinstall_SAME_Field_2 "加/重装组件"
StrCpy $PageReinstall_SAME_Field_3 "卸载${APPLICATION_NAME}"
StrCpy $UNINSTALLER_APPDATA_TITLE "卸载${APPLICATION_NAME}"
StrCpy $SEC_APPLICATION_DETAILS "安装${APPLICATION_NAME}基本组件。"
+1 -1
Ver Arquivo
@@ -13,7 +13,7 @@ if (${CMAKE_C_COMPILER_ID} MATCHES "(GNU|Clang)")
if (NOT CSYNC_STATIC_COMPILE_DIR)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -pedantic -pedantic-errors")
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wshadow -Wmissing-prototypes")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wshadow -Wmissing-prototypes -Wdeclaration-after-statement")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused -Wfloat-equal -Wpointer-arith -Wwrite-strings -Wformat-security")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-format-attribute")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-format-attribute -D_GNU_SOURCE")
+7 -7
Ver Arquivo
@@ -111,8 +111,8 @@ ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll"
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP ${WIN_SETUP_BITMAP_PATH}/page_header.bmp
!define MUI_COMPONENTSPAGE_SMALLDESC
!define MUI_FINISHPAGE_LINK "${APPLICATION_DOMAIN}"
!define MUI_FINISHPAGE_LINK_LOCATION "http://${APPLICATION_DOMAIN}"
!define MUI_FINISHPAGE_LINK "www.${APPLICATION_DOMAIN}"
!define MUI_FINISHPAGE_LINK_LOCATION "http://www.${APPLICATION_DOMAIN}"
!define MUI_FINISHPAGE_NOREBOOTSUPPORT
!ifdef OPTION_FINISHPAGE_RELEASE_NOTES
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
@@ -413,14 +413,15 @@ Section "${APPLICATION_NAME}" SEC_APPLICATION
File "${QT_DLL_PATH}\Qt5Xml.dll"
;Qt deps
File "${MING_BIN}\libpng16-16.dll"
File "${MING_BIN}\icudata53.dll"
File "${MING_BIN}\icui18n53.dll"
File "${MING_BIN}\icuuc53.dll"
File "${MING_BIN}\libpng15-15.dll"
File "${MING_BIN}\icudata51.dll"
File "${MING_BIN}\icui18n51.dll"
File "${MING_BIN}\icuuc51.dll"
File "${MING_BIN}\libEGL.dll"
File "${MING_BIN}\libGLESv2.dll"
File "${MING_BIN}\libjpeg-8.dll"
File "${MING_BIN}\libpcre16-0.dll"
File "${MING_BIN}\libpng15-15.dll"
File "${MING_BIN}\libproxy.dll"
File "${MING_BIN}\libqt5keychain.dll"
File "${MING_BIN}\libsqlite3-0.dll"
@@ -447,7 +448,6 @@ Section "${APPLICATION_NAME}" SEC_APPLICATION
;MinGW stuff
File "${MING_BIN}\libgcc_s_sjlj-1.dll"
File "${MING_BIN}\libstdc++-6.dll"
File "${MING_BIN}\libwinpthread-1.dll"
; CSync configs
File "${SOURCE_PATH}/sync-exclude.lst"
+3 -9
Ver Arquivo
@@ -19,11 +19,10 @@ if( Qt5Core_FOUND )
find_package(Qt5PrintSupport REQUIRED)
find_package(Qt5Quick REQUIRED)
find_package(Qt5Widgets REQUIRED)
if(APPLE)
find_package(Qt5MacExtras REQUIRED)
endif(APPLE)
endif()
if(APPLE)
find_package(Qt5MacExtras REQUIRED)
endif(APPLE)
else( Qt5Core_FOUND )
if(WIN32 OR APPLE)
message(FATAL_ERROR "Qt 5 not found, but application depends on Qt5 on Windows and Mac OS X")
@@ -66,15 +65,10 @@ endif()
qt5_add_resources(${ARGN})
endmacro()
if(NOT TOKEN_AUTH_ONLY)
find_package(Qt5LinguistTools REQUIRED)
macro(qt_add_translation)
qt5_add_translation(${ARGN})
endmacro()
else()
macro(qt_add_translation)
endmacro()
endif()
macro(qt_add_dbus_interface)
qt5_add_dbus_interface(${ARGN})
-2
Ver Arquivo
@@ -6,11 +6,9 @@ if(CMAKE_COMPILER_IS_GNUCXX)
else(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Wno-long-long")
endif(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif(CMAKE_COMPILER_IS_GNUCXX)
if(CMAKE_CXX_COMPILER MATCHES "clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Wno-long-long")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif(CMAKE_CXX_COMPILER MATCHES "clang")
# TODO: handle msvc compilers warnings?
+1 -1
Ver Arquivo
@@ -22,6 +22,7 @@
#cmakedefine HAVE_UTIMES 1
#cmakedefine HAVE_LSTAT 1
#cmakedefine HAVE_FNMATCH 1
#cmakedefine HAVE___MINGW_ASPRINTF 1
#cmakedefine HAVE_ICONV 1
#cmakedefine HAVE_ICONV_CONST 1
@@ -30,6 +31,5 @@
#endif
#cmakedefine HAVE___MINGW_ASPRINTF 1
#cmakedefine HAVE_ASPRINTF 1
#cmakedefine WITH_UNIT_TESTING 1
+2 -2
Ver Arquivo
@@ -96,10 +96,10 @@ include_directories(
)
add_library(${CSYNC_LIBRARY} SHARED ${csync_SRCS})
#add_library(${CSYNC_LIBRARY}_static STATIC ${csync_SRCS})
add_library(${CSYNC_LIBRARY}_static STATIC ${csync_SRCS})
target_link_libraries(${CSYNC_LIBRARY} ${CSYNC_LINK_LIBRARIES})
#target_link_libraries(${CSYNC_LIBRARY}_static ${CSYNC_LINK_LIBRARIES})
target_link_libraries(${CSYNC_LIBRARY}_static ${CSYNC_LINK_LIBRARIES})
set_target_properties(
${CSYNC_LIBRARY}
+10 -4
Ver Arquivo
@@ -128,6 +128,9 @@ int csync_create(CSYNC **csync, const char *local, const char *remote) {
ctx->status_code = CSYNC_STATUS_OK;
ctx->pwd.uid = getuid();
ctx->pwd.euid = geteuid();
ctx->local.list = 0;
ctx->remote.list = 0;
ctx->current_fs = NULL;
@@ -177,8 +180,6 @@ int csync_init(CSYNC *ctx) {
goto out;
}
ctx->remote.root_perms = 0;
ctx->status = CSYNC_STATUS_INIT;
/* initialize random generator */
@@ -242,6 +243,11 @@ int csync_update(CSYNC *ctx) {
c_secdiff(finish, start), c_rbtree_size(ctx->local.tree));
csync_memstat_check();
if (rc < 0) {
ctx->status_code = CSYNC_STATUS_TREE_ERROR;
return -1;
}
/* update detection for remote replica */
csync_gettime(&start);
ctx->current = REMOTE_REPLICA;
@@ -394,13 +400,14 @@ static int _csync_treewalk_visitor(void *obj, void *data) {
trav.path = cur->path;
trav.size = cur->size;
trav.modtime = cur->modtime;
trav.uid = cur->uid;
trav.gid = cur->gid;
trav.mode = cur->mode;
trav.type = cur->type;
trav.instruction = cur->instruction;
trav.rename_path = cur->destpath;
trav.etag = cur->etag;
trav.file_id = cur->file_id;
trav.remotePerm = cur->remotePerm;
trav.directDownloadUrl = cur->directDownloadUrl;
trav.directDownloadCookies = cur->directDownloadCookies;
trav.inode = cur->inode;
@@ -558,7 +565,6 @@ static void _csync_clean_ctx(CSYNC *ctx)
ctx->local.ignored_cleanup = 0;
SAFE_FREE(ctx->statedb.file);
SAFE_FREE(ctx->remote.root_perms);
}
int csync_commit(CSYNC *ctx) {
+7 -1
Ver Arquivo
@@ -165,6 +165,13 @@ struct csync_tree_walk_file_s {
int64_t size;
int64_t inode;
time_t modtime;
#ifdef _WIN32
uint32_t uid;
uint32_t gid;
#else
uid_t uid;
gid_t gid;
#endif
mode_t mode;
enum csync_ftw_type_e type;
enum csync_instructions_e instruction;
@@ -175,7 +182,6 @@ struct csync_tree_walk_file_s {
const char *rename_path;
const char *etag;
const char *file_id;
const char *remotePerm;
char *directDownloadUrl;
char *directDownloadCookies;
struct {
-4
Ver Arquivo
@@ -235,7 +235,6 @@ CSYNC_EXCLUDE_TYPE csync_excluded(CSYNC *ctx, const char *path, int filetype) {
type = CSYNC_FILE_EXCLUDE_LIST;
if (strlen(pattern) < 1) {
SAFE_FREE(pattern_stored);
continue;
}
/* Ecludes starting with ']' means it can be cleanup */
@@ -271,9 +270,6 @@ CSYNC_EXCLUDE_TYPE csync_excluded(CSYNC *ctx, const char *path, int filetype) {
if (bname == NULL || dname == NULL) {
match = CSYNC_NOT_EXCLUDED;
SAFE_FREE(bname);
SAFE_FREE(dname);
SAFE_FREE(pattern_stored);
goto out;
}
+50 -11
Ver Arquivo
@@ -461,7 +461,7 @@ static int dav_connect(csync_owncloud_ctx_t *ctx, const char *base_url) {
if( proxystate < 0 ) {
DEBUG_WEBDAV("Error: Proxy-Configuration failed.");
} else if( proxystate > 0 ) {
ne_set_proxy_auth( ctx->dav_session.ctx, proxy_authentication_callback_by_neon, ctx );
ne_set_proxy_auth( ctx->dav_session.ctx, proxy_authentication_callback_by_neon, 0 );
}
ctx->_connected = 1;
@@ -486,10 +486,20 @@ static void propfind_results_callback(void *userdata,
{
struct listdir_context *fetchCtx = userdata;
struct resource *newres = 0;
const char *clength, *modtime = NULL;
const char *resourcetype = NULL;
const char *md5sum = NULL;
const char *file_id = NULL;
const char *directDownloadUrl = NULL;
const char *directDownloadCookies = NULL;
const ne_status *status = NULL;
char *path = ne_path_unescape( uri->path );
(void) status;
if( ! fetchCtx ) {
DEBUG_WEBDAV("No valid fetchContext");
return;
}
if( ! fetchCtx->target ) {
DEBUG_WEBDAV("error: target must not be zero!" );
@@ -498,9 +508,46 @@ static void propfind_results_callback(void *userdata,
/* Fill the resource structure with the data about the file */
newres = c_malloc(sizeof(struct resource));
ZERO_STRUCTP(newres);
newres->uri = path; /* no need to strdup because ne_path_unescape already allocates */
newres->name = c_basename( path );
fill_webdav_properties_into_resource(newres, set);
modtime = ne_propset_value( set, &ls_props[0] );
clength = ne_propset_value( set, &ls_props[1] );
resourcetype = ne_propset_value( set, &ls_props[2] );
md5sum = ne_propset_value( set, &ls_props[3] );
file_id = ne_propset_value( set, &ls_props[4] );
directDownloadUrl = ne_propset_value( set, &ls_props[5] );
directDownloadCookies = ne_propset_value( set, &ls_props[6] );
newres->type = resr_normal;
if( clength == NULL && resourcetype && strncmp( resourcetype, "<DAV:collection>", 16 ) == 0) {
newres->type = resr_collection;
}
if (modtime) {
newres->modtime = oc_httpdate_parse(modtime);
}
/* DEBUG_WEBDAV("Parsing Modtime: %s -> %llu", modtime, (unsigned long long) newres->modtime ); */
newres->size = 0;
if (clength) {
newres->size = atoll(clength);
/* DEBUG_WEBDAV("Parsed File size for %s from %s: %lld", newres->name, clength, (long long)newres->size ); */
}
if( md5sum ) {
newres->md5 = csync_normalize_etag(md5sum);
}
csync_vio_set_file_id(newres->file_id, file_id);
if (directDownloadUrl) {
newres->directDownloadUrl = c_strdup(directDownloadUrl);
}
if (directDownloadCookies) {
newres->directDownloadCookies = c_strdup(directDownloadCookies);
}
/* prepend the new resource to the result list */
newres->next = fetchCtx->list;
@@ -567,7 +614,7 @@ static struct listdir_context *fetch_resource_list(csync_owncloud_ctx_t *ctx, co
ret = NE_CONNECT;
set_error_message(ctx, req_status->reason_phrase);
}
DEBUG_WEBDAV("Simple propfind result code %d.", req_status ? req_status->code : -1);
DEBUG_WEBDAV("Simple propfind result code %d.", req_status->code);
} else {
if( ret == NE_ERROR && req_status->code == 404) {
errno = ENOENT;
@@ -721,14 +768,6 @@ csync_vio_file_stat_t *owncloud_readdir(CSYNC *ctx, csync_vio_handle_t *dhandle)
SAFE_FREE( escaped_path );
return lfs;
} else {
/* The first item is the root item, memorize its permissions */
if (!ctx->remote.root_perms) {
if (strlen(currResource->remotePerm) > 0) {
/* Only copy if permissions contain something. Empty string means server didn't return them */
ctx->remote.root_perms = c_strdup(currResource->remotePerm);
}
}
}
/* This is the target URI */
+1 -5
Ver Arquivo
@@ -127,7 +127,6 @@ static const ne_propname ls_props[] = {
{ "http://owncloud.org/ns", "id"},
{ "http://owncloud.org/ns", "dDU"},
{ "http://owncloud.org/ns", "dDC"},
{ "http://owncloud.org/ns", "permissions"},
{ NULL, NULL }
};
@@ -147,8 +146,6 @@ typedef struct resource {
// without going through the ownCloud instance.
char *directDownloadUrl;
char *directDownloadCookies;
// See https://github.com/owncloud/core/issues/8322
char remotePerm[REMOTE_PERM_BUF_SIZE+1];
struct resource *next;
} resource;
@@ -189,8 +186,7 @@ time_t oc_httpdate_parse( const char *date );
char *_cleanPath( const char* uri );
void fill_webdav_properties_into_resource(struct resource* newres, const ne_prop_result_set *set);
int _stat_perms( int type );
void resourceToFileStat( csync_vio_file_stat_t *lfs, struct resource *res );
void resource_free(struct resource* o);
struct resource* resource_dup(struct resource* o);
+49 -6
Ver Arquivo
@@ -98,7 +98,11 @@ static void propfind_results_recursive_callback(void *userdata,
const ne_prop_result_set *set)
{
struct resource *newres = 0;
const char *clength, *modtime, *file_id = NULL;
const char *directDownloadUrl = NULL;
const char *directDownloadCookies = NULL;
const char *resourcetype = NULL;
const char *md5sum = NULL;
const ne_status *status = NULL;
char *path = ne_path_unescape( uri->path );
char *parentPath;
@@ -116,17 +120,55 @@ static void propfind_results_recursive_callback(void *userdata,
/* Fill the resource structure with the data about the file */
newres = c_malloc(sizeof(struct resource));
ZERO_STRUCTP(newres);
newres->uri = path; /* no need to strdup because ne_path_unescape already allocates */
newres->name = c_basename( path );
fill_webdav_properties_into_resource(newres, set);
if( newres->type == resr_collection) {
modtime = ne_propset_value( set, &ls_props[0] );
clength = ne_propset_value( set, &ls_props[1] );
resourcetype = ne_propset_value( set, &ls_props[2] );
md5sum = ne_propset_value( set, &ls_props[3] );
file_id = ne_propset_value( set, &ls_props[4] );
directDownloadUrl = ne_propset_value( set, &ls_props[5] );
directDownloadCookies = ne_propset_value( set, &ls_props[6] );
newres->type = resr_normal;
if( resourcetype && strncmp( resourcetype, "<DAV:collection>", 16 ) == 0) {
newres->type = resr_collection;
ctx->propfind_recursive_cache_folder_count++;
} else {
/* DEBUG_WEBDAV("propfind_results_recursive %s [%d]", newres->uri, newres->type); */
ctx->propfind_recursive_cache_file_count++;
}
if (modtime) {
newres->modtime = oc_httpdate_parse(modtime);
}
/* DEBUG_WEBDAV("Parsing Modtime: %s -> %llu", modtime, (unsigned long long) newres->modtime ); */
newres->size = 0;
if (clength) {
newres->size = atoll(clength);
/* DEBUG_WEBDAV("Parsed File size for %s from %s: %lld", newres->name, clength, (long long)newres->size ); */
}
if( md5sum ) {
newres->md5 = csync_normalize_etag(md5sum);
}
csync_vio_set_file_id(newres->file_id, file_id);
/*
DEBUG_WEBDAV("propfind_results_recursive %s [%s] %s", newres->uri, newres->type == resr_collection ? "collection" : "file", newres->md5);
*/
if (directDownloadUrl) {
newres->directDownloadUrl = c_strdup(directDownloadUrl);
}
if (directDownloadCookies) {
newres->directDownloadCookies = c_strdup(directDownloadCookies);
}
/* Create new item in rb tree */
if (newres->type == resr_collection) {
DEBUG_WEBDAV("propfind_results_recursive %s is a folder", newres->uri);
@@ -171,12 +213,13 @@ static void propfind_results_recursive_callback(void *userdata,
}
/* DEBUG_WEBDAV("results_recursive Added child %s to collection %s", newres->uri, element->self->uri); */
return;
} else {
/* DEBUG_WEBDAV("results_recursive No parent %s found for child %s", parentPath, newres->uri); */
resource_free(newres);
newres = NULL;
}
}
resource_free(newres);
newres = NULL;
}
void fetch_resource_list_recursive(csync_owncloud_ctx_t *ctx, const char *uri, const char *curi)
+19 -65
Ver Arquivo
@@ -298,6 +298,10 @@ void resourceToFileStat(csync_vio_file_stat_t *lfs, struct resource *res )
DEBUG_WEBDAV("ERROR: Unknown resource type %d", res->type);
}
// FIXME Those are defaults, we'll have to use the real ownCloud WebDAV permissions soon
lfs->mode = _stat_perms( lfs->type );
lfs->fields |= CSYNC_VIO_FILE_STAT_FIELDS_PERMISSIONS;
lfs->mtime = res->modtime;
lfs->fields |= CSYNC_VIO_FILE_STAT_FIELDS_MTIME;
lfs->size = res->size;
@@ -317,73 +321,26 @@ void resourceToFileStat(csync_vio_file_stat_t *lfs, struct resource *res )
lfs->fields |= CSYNC_VIO_FILE_STAT_FIELDS_DIRECTDOWNLOADCOOKIES;
lfs->directDownloadCookies = c_strdup(res->directDownloadCookies);
}
if (strlen(res->remotePerm) > 0) {
lfs->fields |= CSYNC_VIO_FILE_STAT_FIELDS_PERM;
strncpy(lfs->remotePerm, res->remotePerm, sizeof(lfs->remotePerm));
}
}
void fill_webdav_properties_into_resource(struct resource* newres, const ne_prop_result_set *set)
{
const char *clength, *modtime, *file_id = NULL;
const char *directDownloadUrl = NULL;
const char *directDownloadCookies = NULL;
const char *resourcetype = NULL;
const char *etag = NULL;
const char *perm = NULL;
/* WebDAV does not deliver permissions. Set a default here. */
int _stat_perms( int type ) {
int ret = 0;
modtime = ne_propset_value( set, &ls_props[0] );
clength = ne_propset_value( set, &ls_props[1] );
resourcetype = ne_propset_value( set, &ls_props[2] );
etag = ne_propset_value( set, &ls_props[3] );
file_id = ne_propset_value( set, &ls_props[4] );
directDownloadUrl = ne_propset_value( set, &ls_props[5] );
directDownloadCookies = ne_propset_value( set, &ls_props[6] );
perm = ne_propset_value( set, &ls_props[7] );
if( resourcetype && strncmp( resourcetype, "<DAV:collection>", 16 ) == 0) {
newres->type = resr_collection;
if( type == CSYNC_VIO_FILE_TYPE_DIRECTORY ) {
/* DEBUG_WEBDAV("Setting mode in stat (dir)"); */
/* directory permissions */
ret = S_IFDIR | S_IRUSR | S_IWUSR | S_IXUSR /* directory, rwx for user */
| S_IRGRP | S_IXGRP /* rx for group */
| S_IROTH | S_IXOTH; /* rx for others */
} else {
newres->type = resr_normal;
}
if (modtime) {
newres->modtime = oc_httpdate_parse(modtime);
}
/* DEBUG_WEBDAV("Parsing Modtime: %s -> %llu", modtime, (unsigned long long) newres->modtime ); */
newres->size = 0;
if (clength) {
newres->size = atoll(clength);
/* DEBUG_WEBDAV("Parsed File size for %s from %s: %lld", newres->name, clength, (long long)newres->size ); */
}
if( etag ) {
newres->md5 = csync_normalize_etag(etag);
}
csync_vio_set_file_id(newres->file_id, file_id);
/*
DEBUG_WEBDAV("propfind_results_recursive %s [%s] %s", newres->uri, newres->type == resr_collection ? "collection" : "file", newres->md5);
*/
if (directDownloadUrl) {
newres->directDownloadUrl = c_strdup(directDownloadUrl);
}
if (directDownloadCookies) {
newres->directDownloadCookies = c_strdup(directDownloadCookies);
}
/* DEBUG_WEBDAV("fill_webdav_properties_into_resource %s >%p< ", newres->name, perm ); */
if (perm && !perm[0]) {
// special meaning for our code: server returned permissions but are empty
// meaning only reading is allowed for this resource
newres->remotePerm[0] = ' ';
// see _csync_detect_update()
} else if (perm && strlen(perm) < sizeof(newres->remotePerm)) {
strncpy(newres->remotePerm, perm, sizeof(newres->remotePerm));
} else {
// old server, keep newres->remotePerm empty
/* regualar file permissions */
/* DEBUG_WEBDAV("Setting mode in stat (file)"); */
ret = S_IFREG | S_IRUSR | S_IWUSR /* regular file, user read & write */
| S_IRGRP /* group read perm */
| S_IROTH; /* others read perm */
}
return ret;
}
struct resource* resource_dup(struct resource* o) {
@@ -404,9 +361,6 @@ struct resource* resource_dup(struct resource* o) {
if (o->directDownloadCookies) {
r->directDownloadCookies = c_strdup(o->directDownloadCookies);
}
if (o->remotePerm) {
strncpy(r->remotePerm, o->remotePerm, sizeof(r->remotePerm));
}
r->next = o->next;
csync_vio_set_file_id(r->file_id, o->file_id);
+12 -5
Ver Arquivo
@@ -94,6 +94,7 @@ struct csync_s {
char *file;
sqlite3 *db;
int exists;
int disabled;
sqlite3_stmt* by_hash_stmt;
sqlite3_stmt* by_fileid_stmt;
@@ -115,15 +116,20 @@ struct csync_s {
enum csync_replica_e type;
int read_from_db;
c_list_t *ignored_cleanup;
const char *root_perms; /* Permission of the root folder. (Since the root folder is not in the db tree, we need to keep a separate entry.) */
} remote;
#if defined(HAVE_ICONV) && defined(WITH_ICONV)
struct {
int sync_symbolic_links;
int timeout;
#if defined(HAVE_ICONV) && defined(WITH_ICONV)
iconv_t iconv_cd;
} options;
#endif
} options;
struct {
uid_t uid;
uid_t euid;
} pwd;
/* replica we are currently walking */
enum csync_replica_e current;
@@ -158,6 +164,8 @@ struct csync_file_stat_s {
int64_t size; /* u64 */
size_t pathlen; /* u64 */
uint64_t inode; /* u64 */
uid_t uid; /* u32 */
gid_t gid; /* u32 */
mode_t mode; /* u32 */
int nlink; /* u32 */
int type; /* u32 */
@@ -169,7 +177,6 @@ struct csync_file_stat_s {
char file_id[FILE_ID_BUF_SIZE+1]; /* the ownCloud file id is fixed width of 21 byte. */
char *directDownloadUrl;
char *directDownloadCookies;
char remotePerm[REMOTE_PERM_BUF_SIZE+1];
CSYNC_STATUS error_status;
+2 -4
Ver Arquivo
@@ -184,7 +184,6 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
csync_vio_set_file_id( other->file_id, cur->file_id );
}
other->inode = cur->inode;
other->should_update_etag = true;
cur->instruction = CSYNC_INSTRUCTION_NONE;
} else if (other->instruction == CSYNC_INSTRUCTION_REMOVE) {
other->instruction = CSYNC_INSTRUCTION_RENAME;
@@ -194,7 +193,6 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
csync_vio_set_file_id( other->file_id, cur->file_id );
}
other->inode = cur->inode;
other->should_update_etag = true;
cur->instruction = CSYNC_INSTRUCTION_NONE;
} else if (other->instruction == CSYNC_INSTRUCTION_NEW) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "OOOO=> NEW detected in other tree!");
@@ -240,8 +238,8 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
/* file on other replica is changed or new */
case CSYNC_INSTRUCTION_NEW:
case CSYNC_INSTRUCTION_EVAL:
if (other->type == CSYNC_FTW_TYPE_DIR &&
cur->type == CSYNC_FTW_TYPE_DIR) {
if (other->type == CSYNC_VIO_FILE_TYPE_DIRECTORY &&
cur->type == CSYNC_VIO_FILE_TYPE_DIRECTORY) {
is_equal_files = (other->modtime == cur->modtime);
} else {
is_equal_files = ((other->size == cur->size) && (other->modtime == cur->modtime));
+3 -8
Ver Arquivo
@@ -133,8 +133,6 @@ static int _csync_statedb_check(const char *statedb) {
}
}
}
} else {
close(fd);
}
/* if it comes here, the database is broken and should be recreated. */
_tunlink(wstatedb);
@@ -300,6 +298,8 @@ static int _csync_file_stat_from_metadata_table( csync_file_stat_t **st, sqlite3
name = (const char*) sqlite3_column_text(stmt, 2);
memcpy((*st)->path, (len ? name : ""), len + 1);
(*st)->inode = sqlite3_column_int64(stmt,3);
(*st)->uid = sqlite3_column_int(stmt, 4);
(*st)->gid = sqlite3_column_int(stmt, 5);
(*st)->mode = sqlite3_column_int(stmt, 6);
(*st)->modtime = strtoul((char*)sqlite3_column_text(stmt, 7), NULL, 10);
@@ -313,11 +313,6 @@ static int _csync_file_stat_from_metadata_table( csync_file_stat_t **st, sqlite3
if(column_count > 10 && sqlite3_column_text(stmt,10)) {
csync_vio_set_file_id((*st)->file_id, (char*) sqlite3_column_text(stmt, 10));
}
if(column_count > 11 && sqlite3_column_text(stmt,11)) {
strncpy((*st)->remotePerm,
(char*) sqlite3_column_text(stmt, 11),
REMOTE_PERM_BUF_SIZE);
}
}
}
return rc;
@@ -457,7 +452,7 @@ char *csync_statedb_get_etag( CSYNC *ctx, uint64_t jHash ) {
return ret;
}
#define BELOW_PATH_QUERY "SELECT phash, pathlen, path, inode, uid, gid, mode, modtime, type, md5, fileid, remotePerm FROM metadata WHERE path LIKE(?)"
#define BELOW_PATH_QUERY "SELECT phash, pathlen, path, inode, uid, gid, mode, modtime, type, md5, fileid FROM metadata WHERE path LIKE(?)"
int csync_statedb_get_below_path( CSYNC *ctx, const char *path ) {
int rc;
+10 -24
Ver Arquivo
@@ -140,14 +140,6 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
len = strlen(path);
/* This code should probably be in csync_exclude, but it does not have the fs parameter.
Keep it here for now and TODO also find out if we want this for Windows
https://github.com/owncloud/mirall/issues/2086 */
if (fs->flags & CSYNC_VIO_FILE_FLAGS_HIDDEN) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "file excluded because it is a hidden file: %s", path);
return 0;
}
/* Check if file is excluded */
excluded = csync_excluded(ctx, path,type);
@@ -262,31 +254,26 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
st->instruction = CSYNC_INSTRUCTION_EVAL;
goto out;
}
bool metadata_differ = (ctx->current == REMOTE_REPLICA && (!c_streq(fs->file_id, tmp->file_id)
|| !c_streq(fs->remotePerm, tmp->remotePerm)))
|| (ctx->current == LOCAL_REPLICA && fs->inode != tmp->inode);
if (type == CSYNC_FTW_TYPE_DIR && ctx->current == REMOTE_REPLICA
&& !metadata_differ && !ctx->read_from_db_disabled) {
&& c_streq(fs->file_id, tmp->file_id) && !ctx->read_from_db_disabled) {
/* If both etag and file id are equal for a directory, read all contents from
* the database.
* The metadata comparison ensure that we fetch all the file id or permission when
* upgrading owncloud
* The comparison of file id ensure that we fetch all the file id when upgrading from
* owncloud 5 to owncloud 6.
*/
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "Reading from database: %s", path);
ctx->remote.read_from_db = true;
}
if (metadata_differ) {
/* file id or permissions has changed. Which means we need to update them in the DB. */
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "Need to update metadata for: %s", path);
if (!c_streq(fs->file_id, tmp->file_id) && ctx->current == REMOTE_REPLICA) {
/* file id has changed. Which means we need to update the DB.
* (upgrade from owncloud 5 to owncloud 6 for instence) */
st->should_update_etag = true;
}
st->instruction = CSYNC_INSTRUCTION_NONE;
} else {
enum csync_vio_file_type_e tmp_vio_type = CSYNC_VIO_FILE_TYPE_UNKNOWN;
/* tmp might point to malloc mem, so free it here before reusing tmp */
SAFE_FREE(tmp);
/* check if it's a file and has been renamed */
if (ctx->current == LOCAL_REPLICA) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "Checking for rename based on inode # %" PRId64 "", (uint64_t) fs->inode);
@@ -390,9 +377,7 @@ out:
SAFE_FREE(st->directDownloadCookies);
st->directDownloadCookies = c_strdup(fs->directDownloadCookies);
}
if (fs->fields & CSYNC_VIO_FILE_STAT_FIELDS_PERM) {
strncpy(st->remotePerm, fs->remotePerm, REMOTE_PERM_BUF_SIZE);
}
fastout: /* target if the file information is read from database into st */
st->phash = h;
@@ -701,7 +686,8 @@ int csync_ftw(CSYNC *ctx, const char *uri, csync_walker_fn fn,
if (flag == CSYNC_FTW_FLAG_DIR && ctx->current_fs
&& (ctx->current_fs->instruction == CSYNC_INSTRUCTION_EVAL ||
ctx->current_fs->instruction == CSYNC_INSTRUCTION_NEW)) {
ctx->current_fs->instruction == CSYNC_INSTRUCTION_NEW ||
ctx->current_fs->instruction == CSYNC_INSTRUCTION_EVAL_RENAME)) {
ctx->current_fs->should_update_etag = true;
}
+6 -6
Ver Arquivo
@@ -113,12 +113,12 @@ void csync_win32_set_file_hidden( const char *file, bool h ) {
fileName = c_utf8_to_locale( file );
dwAttrs = GetFileAttributesW(fileName);
if (dwAttrs != INVALID_FILE_ATTRIBUTES) {
if (h && !(dwAttrs & FILE_ATTRIBUTE_HIDDEN)) {
SetFileAttributesW(fileName, dwAttrs | FILE_ATTRIBUTE_HIDDEN );
} else if (!h && (dwAttrs & FILE_ATTRIBUTE_HIDDEN)) {
SetFileAttributesW(fileName, dwAttrs & ~FILE_ATTRIBUTE_HIDDEN );
}
if (dwAttrs==INVALID_FILE_ATTRIBUTES) return;
if (h && !(dwAttrs & FILE_ATTRIBUTE_HIDDEN)) {
SetFileAttributesW(fileName, dwAttrs | FILE_ATTRIBUTE_HIDDEN );
} else if (!h && (dwAttrs & FILE_ATTRIBUTE_HIDDEN)) {
SetFileAttributesW(fileName, dwAttrs & ~FILE_ATTRIBUTE_HIDDEN );
}
c_free_locale_string(fileName);
+2 -2
Ver Arquivo
@@ -204,9 +204,9 @@ void hbf_free_transfer( hbf_transfer_t *transfer ) {
for( cnt = 0; cnt < transfer->block_cnt; cnt++ ) {
hbf_block_t *block = transfer->block_arr[cnt];
if( !block ) continue;
if( block->http_error_msg ) free( block->http_error_msg );
if( block->etag ) free( block->etag );
if( block ) free(block);
}
free( transfer->block_arr );
free( transfer->url );
@@ -536,8 +536,8 @@ Hbf_State hbf_transfer( ne_session *session, hbf_transfer_t *transfer, const cha
} else {
state = HBF_MEMORY_FAIL;
}
free( transfer_url );
}
free( transfer_url );
}
/* do the source file validation finally (again). */
+1 -2
Ver Arquivo
@@ -135,8 +135,7 @@ int c_utimes(const char *uri, const struct timeval *times) {
if(!SetFileTime(hFile, NULL, &LastAccessTime, &LastModificationTime)) {
//can this happen?
errno=ENOENT;
CloseHandle(hFile);
c_free_locale_string(wuri);
CloseHandle(hFile);
return -1;
}
+4 -10
Ver Arquivo
@@ -34,15 +34,12 @@
#define FILE_ID_BUF_SIZE 21
// currently specified at https://github.com/owncloud/core/issues/8322 are 9 to 10
#define REMOTE_PERM_BUF_SIZE 15
typedef struct csync_vio_file_stat_s csync_vio_file_stat_t;
enum csync_vio_file_flags_e {
CSYNC_VIO_FILE_FLAGS_NONE = 0,
CSYNC_VIO_FILE_FLAGS_SYMLINK = 1 << 0,
CSYNC_VIO_FILE_FLAGS_HIDDEN = 1 << 1
CSYNC_VIO_FILE_FLAGS_LOCAL = 1 << 1
};
enum csync_vio_file_type_e {
@@ -59,7 +56,7 @@ enum csync_vio_file_type_e {
enum csync_vio_file_stat_fields_e {
CSYNC_VIO_FILE_STAT_FIELDS_NONE = 0,
CSYNC_VIO_FILE_STAT_FIELDS_TYPE = 1 << 0,
CSYNC_VIO_FILE_STAT_FIELDS_MODE = 1 << 1, // local POSIX mode
CSYNC_VIO_FILE_STAT_FIELDS_PERMISSIONS = 1 << 1,
CSYNC_VIO_FILE_STAT_FIELDS_FLAGS = 1 << 2,
CSYNC_VIO_FILE_STAT_FIELDS_DEVICE = 1 << 3,
CSYNC_VIO_FILE_STAT_FIELDS_INODE = 1 << 4,
@@ -78,19 +75,16 @@ enum csync_vio_file_stat_fields_e {
CSYNC_VIO_FILE_STAT_FIELDS_ETAG = 1 << 17,
CSYNC_VIO_FILE_STAT_FIELDS_FILE_ID = 1 << 18,
CSYNC_VIO_FILE_STAT_FIELDS_DIRECTDOWNLOADURL = 1 << 19,
CSYNC_VIO_FILE_STAT_FIELDS_DIRECTDOWNLOADCOOKIES = 1 << 20,
CSYNC_VIO_FILE_STAT_FIELDS_PERM = 1 << 21 // remote oC perm
CSYNC_VIO_FILE_STAT_FIELDS_DIRECTDOWNLOADCOOKIES = 1 << 20
};
struct csync_vio_file_stat_s {
char *name;
char *etag; // FIXME: Should this be inlined like file_id and perm?
char *etag;
char file_id[FILE_ID_BUF_SIZE+1];
char *directDownloadUrl;
char *directDownloadCookies;
char remotePerm[REMOTE_PERM_BUF_SIZE+1];
time_t atime;
time_t mtime;
+5 -9
Ver Arquivo
@@ -224,10 +224,12 @@ int csync_vio_local_stat(const char *uri, csync_vio_file_stat_t *buf) {
buf->type = CSYNC_VIO_FILE_TYPE_REGULAR;
break;
} while (0);
/* TODO Do we want to parse for CSYNC_VIO_FILE_FLAGS_HIDDEN ? */
buf->fields |= CSYNC_VIO_FILE_STAT_FIELDS_FLAGS;
buf->fields |= CSYNC_VIO_FILE_STAT_FIELDS_TYPE;
buf->mode = 666;
buf->fields |= CSYNC_VIO_FILE_STAT_FIELDS_PERMISSIONS;
buf->device = fileInfo.dwVolumeSerialNumber;
buf->fields |= CSYNC_VIO_FILE_STAT_FIELDS_DEVICE;
@@ -238,7 +240,7 @@ int csync_vio_local_stat(const char *uri, csync_vio_file_stat_t *buf) {
/* printf("Index: %I64i\n", FileIndex.QuadPart); */
buf->inode = FileIndex.QuadPart;
buf->size = (fileInfo.nFileSizeHigh * ((int64_t)(MAXDWORD)+1)) + fileInfo.nFileSizeLow;
buf->size = (fileInfo.nFileSizeHigh * (int64_t)(MAXDWORD+1)) + fileInfo.nFileSizeLow;
buf->fields |= CSYNC_VIO_FILE_STAT_FIELDS_SIZE;
/* Get the file time with a win32 call rather than through stat. See
@@ -258,7 +260,6 @@ int csync_vio_local_stat(const char *uri, csync_vio_file_stat_t *buf) {
buf->fields |= CSYNC_VIO_FILE_STAT_FIELDS_CTIME;
}
c_free_locale_string(wuri);
CloseHandle(h);
return 0;
@@ -314,7 +315,7 @@ int csync_vio_local_stat(const char *uri, csync_vio_file_stat_t *buf) {
buf->fields |= CSYNC_VIO_FILE_STAT_FIELDS_TYPE;
buf->mode = sb.st_mode;
buf->fields |= CSYNC_VIO_FILE_STAT_FIELDS_MODE;
buf->fields |= CSYNC_VIO_FILE_STAT_FIELDS_PERMISSIONS;
if (buf->type == CSYNC_VIO_FILE_TYPE_SYMBOLIC_LINK) {
/* FIXME: handle symlink */
@@ -322,11 +323,6 @@ int csync_vio_local_stat(const char *uri, csync_vio_file_stat_t *buf) {
} else {
buf->flags = CSYNC_VIO_FILE_FLAGS_NONE;
}
#ifdef __APPLE__
if (sb.st_flags & UF_HIDDEN) {
buf->flags |= CSYNC_VIO_FILE_FLAGS_HIDDEN;
}
#endif
buf->fields |= CSYNC_VIO_FILE_STAT_FIELDS_FLAGS;
buf->device = sb.st_dev;
@@ -38,6 +38,7 @@ static void check_csync_destroy_null(void **state)
static void check_csync_create(void **state)
{
CSYNC *csync;
char confdir[1024] = {0};
int rc;
(void) state; /* unused */
@@ -120,6 +120,8 @@ static csync_vio_file_stat_t* create_fstat(const char *name,
fs->type = CSYNC_VIO_FILE_TYPE_REGULAR;
fs->fields |= CSYNC_VIO_FILE_STAT_FIELDS_TYPE;
fs->mode = 0644;
fs->fields |= CSYNC_VIO_FILE_STAT_FIELDS_PERMISSIONS;
if (inode == 0) {
fs->inode = 619070;
+1 -23
Ver Arquivo
@@ -185,34 +185,12 @@ assertLocalAndRemoteDir( 'remoteToLocal1', 1);
printInfo("Move a file from the server");
$inode = getInode('remoteToLocal1/rtl2/kb1_local_gone.jpg');
moveRemoteFile( 'remoteToLocal1/rtl2/kb1_local_gone.jpg', 'remoteToLocal1/rtl2/kb1_local_gone2.jpg');
#also create a new directory localy for the next test
mkdir( localDir().'superNewDir' );
createLocalFile(localDir(). 'superNewDir/f1', 1234 );
createLocalFile(localDir(). 'superNewDir/f2', 1324 );
my $superNewDirInode = getInode('superNewDir');
csync();
assertLocalAndRemoteDir( '', 1);
assertLocalAndRemoteDir( 'remoteToLocal1', 1);
$inode2 = getInode('remoteToLocal1/rtl2/kb1_local_gone2.jpg');
assert( $inode == $inode2, "Inode has changed 3!");
printInfo("Move a newly created directory");
moveRemoteFile('superNewDir', 'superNewDirRenamed');
#also add new files in new directory
createLocalFile(localDir(). 'superNewDir/f3' , 2456 );
$inode = getInode('superNewDir/f3');
csync();
assertLocalAndRemoteDir( '', 1);
assert( ! -e localDir().'superNewDir' );
$inode2 = getInode('superNewDir/f3');
assert( $inode == $inode2, "Inode of f3 changed");
$inode2 = getInode('superNewDir');
assert( $superNewDirInode == $inode2, "Inode of superNewDir changed");
cleanup();
+1
Ver Arquivo
@@ -30,6 +30,7 @@ use ownCloud::Test;
use strict;
print "Hello, this is t5, a tester for syncing of files in Shares\n";
# stat error occours on windsows when the file is busy for example
initTesting();
-256
Ver Arquivo
@@ -1,256 +0,0 @@
#!/usr/bin/perl
#
# Test script for the ownCloud module of csync.
# This script requires a running ownCloud instance accessible via HTTP.
# It does quite some fancy tests and asserts the results.
#
# Copyright (C) by Klaas Freitag <freitag@owncloud.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
use lib ".";
use Carp::Assert;
use File::Copy;
use ownCloud::Test;
use strict;
print "Hello, this is t7, a tester for syncing of files in read only directory\n";
# Check if the expected rows in the DB are non-empty. Note that in some cases they might be, then we cannot use this function
# https://github.com/owncloud/mirall/issues/2038
sub assertCsyncJournalOk {
my $path = $_[0];
# FIXME: should test also remoteperm but it's not working with owncloud6
# my $cmd = 'sqlite3 ' . $path . '.csync_journal.db "SELECT count(*) from metadata where length(remotePerm) == 0 or length(fileId) == 0"';
my $cmd = 'sqlite3 ' . $path . '.csync_journal.db "SELECT count(*) from metadata where length(fileId) == 0"';
my $result = `$cmd`;
assert($result == "0");
}
# IMPORTANT NOTE :
print "This test use the OWNCLOUD_TEST_PERMISSIONS environement variable and _PERM_xxx_ on filenames to set the permission. ";
print "It does not rely on real permission set on the server. This test is just for testing the propagation choices\n";
# "It would be nice" to have a test that test with real permissions on the server
$ENV{OWNCLOUD_TEST_PERMISSIONS} = "1";
initTesting();
printInfo( "Init" );
#create some files localy
my $tmpdir = "/tmp/t7/";
mkdir($tmpdir);
createLocalFile( $tmpdir . "normalFile_PERM_WVND_.data", 100 );
createLocalFile( $tmpdir . "cannotBeRemoved_PERM_WVN_.data", 101 );
createLocalFile( $tmpdir . "canBeRemoved_PERM_D_.data", 102 );
my $md5CanotBeModified = createLocalFile( $tmpdir . "canotBeModified_PERM_DVN_.data", 103 );
createLocalFile( $tmpdir . "canBeModified_PERM_W_.data", 104 );
#put them in some directories
createRemoteDir( "normalDirectory_PERM_CKDNV_" );
glob_put( "$tmpdir/*", "normalDirectory_PERM_CKDNV_" );
createRemoteDir( "readonlyDirectory_PERM_M_" );
glob_put( "$tmpdir/*", "readonlyDirectory_PERM_M_" );
createRemoteDir( "readonlyDirectory_PERM_M_/subdir_PERM_CK_" );
createRemoteDir( "readonlyDirectory_PERM_M_/subdir_PERM_CK_/subsubdir_PERM_CKDNV_" );
glob_put( "$tmpdir/normalFile_PERM_WVND_.data", "readonlyDirectory_PERM_M_/subdir_PERM_CK_/subsubdir_PERM_CKDNV_" );
csync();
assertCsyncJournalOk(localDir());
assertLocalAndRemoteDir( '', 0);
system("sleep 1"); #make sure changes have different mtime
printInfo( "Do some changes and see how they propagate" );
#1. remove the file than cannot be removed
# (they should be recovered)
unlink( localDir() . 'normalDirectory_PERM_CKDNV_/cannotBeRemoved_PERM_WVN_.data' );
unlink( localDir() . 'readonlyDirectory_PERM_M_/cannotBeRemoved_PERM_WVN_.data' );
#2. remove the file that can be removed
# (they should properly be gone)
unlink( localDir() . 'normalDirectory_PERM_CKDNV_/canBeRemoved_PERM_D_.data' );
unlink( localDir() . 'readonlyDirectory_PERM_M_/canBeRemoved_PERM_D_.data' );
#3. Edit the files that cannot be modified
# (they should be recovered, and a conflict shall be created)
system("echo 'modified' > ". localDir() . "normalDirectory_PERM_CKDNV_/canotBeModified_PERM_DVN_.data");
system("echo 'modified_' > ". localDir() . "readonlyDirectory_PERM_M_/canotBeModified_PERM_DVN_.data");
#4. Edit other files
# (they should be uploaded)
system("echo '__modified' > ". localDir() . "normalDirectory_PERM_CKDNV_/canBeModified_PERM_W_.data");
system("echo '__modified_' > ". localDir() . "readonlyDirectory_PERM_M_/canBeModified_PERM_W_.data");
#5. Create a new file in a read only folder
# (they should not be uploaded)
createLocalFile( localDir() . "readonlyDirectory_PERM_M_/newFile_PERM_WDNV_.data", 105 );
#6. Create a new file in a read only folder
# (should be uploaded)
createLocalFile( localDir() . "normalDirectory_PERM_CKDNV_/newFile_PERM_WDNV_.data", 106 );
#do the sync
csync();
assertCsyncJournalOk(localDir());
#1.
# File should be recovered
assert( -e localDir(). 'normalDirectory_PERM_CKDNV_/cannotBeRemoved_PERM_WVN_.data' );
assert( -e localDir(). 'readonlyDirectory_PERM_M_/cannotBeRemoved_PERM_WVN_.data' );
#2.
# File should be deleted
assert( !-e localDir() . 'normalDirectory_PERM_CKDNV_/canBeRemoved_PERM_D_.data' );
assert( !-e localDir() . 'readonlyDirectory_PERM_M_/canBeRemoved_PERM_D_.data' );
#3.
# File should be recovered
assert($md5CanotBeModified eq md5OfFile( localDir().'normalDirectory_PERM_CKDNV_/canotBeModified_PERM_DVN_.data' ));
assert($md5CanotBeModified eq md5OfFile( localDir().'readonlyDirectory_PERM_M_/canotBeModified_PERM_DVN_.data' ));
# and conflict created
# TODO check that the conflict file has the right content
assert( -e glob(localDir().'normalDirectory_PERM_CKDNV_/canotBeModified_PERM_DVN__conflict-*.data' ) );
assert( -e glob(localDir().'readonlyDirectory_PERM_M_/canotBeModified_PERM_DVN__conflict-*.data' ) );
# remove the conflicts for the next assertLocalAndRemoteDir
system("rm " . localDir().'normalDirectory_PERM_CKDNV_/canotBeModified_PERM_DVN__conflict-*.data' );
system("rm " . localDir().'readonlyDirectory_PERM_M_/canotBeModified_PERM_DVN__conflict-*.data' );
#4. File should be updated, that's tested by assertLocalAndRemoteDir
#5.
# The file should not exist on the remote
# TODO: test that the file is NOT on the server
# but still be there
assert( -e localDir() . "readonlyDirectory_PERM_M_/newFile_PERM_WDNV_.data" );
# remove it so assertLocalAndRemoteDir succeed.
unlink(localDir() . "readonlyDirectory_PERM_M_/newFile_PERM_WDNV_.data");
#6.
# the file should be in the server and local
assert( -e localDir() . "normalDirectory_PERM_CKDNV_/newFile_PERM_WDNV_.data" );
### Both side should still be the same
assertLocalAndRemoteDir( '', 0);
#######################################################################
printInfo( "remove the read only directory" );
# -> It must be recovered
system("rm -r " . localDir().'readonlyDirectory_PERM_M_' );
csync();
assertCsyncJournalOk(localDir());
assert( -e localDir(). 'readonlyDirectory_PERM_M_/cannotBeRemoved_PERM_WVN_.data' );
assert( -e localDir(). 'readonlyDirectory_PERM_M_/subdir_PERM_CK_/subsubdir_PERM_CKDNV_/normalFile_PERM_WVND_.data' );
assertLocalAndRemoteDir( '', 0);
#######################################################################
printInfo( "move a directory in a outside read only folder" );
system("sqlite3 " . localDir().'.csync_journal.db .dump');
#Missing directory should be restored
#new directory should be uploaded
system("mv " . localDir().'readonlyDirectory_PERM_M_/subdir_PERM_CK_ ' . localDir().'normalDirectory_PERM_CKDNV_/subdir_PERM_CKDNV_' );
# two syncs may be necessary for now: https://github.com/owncloud/mirall/issues/2038
csync();
csync();
system("sqlite3 " . localDir().'.csync_journal.db .dump');
assertCsyncJournalOk(localDir());
# old name restored
assert( -e localDir(). 'readonlyDirectory_PERM_M_/subdir_PERM_CK_/subsubdir_PERM_CKDNV_/' );
assert( -e localDir(). 'readonlyDirectory_PERM_M_/subdir_PERM_CK_/subsubdir_PERM_CKDNV_/normalFile_PERM_WVND_.data' );
# new still exist
assert( -e localDir(). 'normalDirectory_PERM_CKDNV_/subdir_PERM_CKDNV_/subsubdir_PERM_CKDNV_/normalFile_PERM_WVND_.data' );
assertLocalAndRemoteDir( '', 0);
#######################################################################
printInfo( "rename a directory in a read only folder and move a directory to a read-only" );
# do a sync to update the database
csync();
#1. rename a directory in a read only folder
#Missing directory should be restored
#new directory should stay but not be uploaded
system("mv " . localDir().'readonlyDirectory_PERM_M_/subdir_PERM_CK_ ' . localDir().'readonlyDirectory_PERM_M_/newname_PERM_CK_' );
#2. move a directory from read to read only (move the directory from previous step)
system("mv " . localDir().'normalDirectory_PERM_CKDNV_/subdir_PERM_CKDNV_ ' . localDir().'readonlyDirectory_PERM_M_/moved_PERM_CK_' );
# two syncs may be necessary for now: https://github.com/owncloud/mirall/issues/2038
csync();
csync();
assertCsyncJournalOk(localDir());
#1.
# old name restored
assert( -e localDir(). 'readonlyDirectory_PERM_M_/subdir_PERM_CK_/subsubdir_PERM_CKDNV_/normalFile_PERM_WVND_.data' );
# new still exist
assert( -e localDir(). 'readonlyDirectory_PERM_M_/newname_PERM_CK_/subsubdir_PERM_CKDNV_/normalFile_PERM_WVND_.data' );
# but is not on server: so remove for assertLocalAndRemoteDir
system("rm -r " . localDir(). "readonlyDirectory_PERM_M_/newname_PERM_CK_");
#2.
# old removed
assert( ! -e localDir(). 'normalDirectory_PERM_CKDNV_/subdir_PERM_CKDNV_/' );
# new still there
assert( -e localDir(). 'readonlyDirectory_PERM_M_/moved_PERM_CK_/subsubdir_PERM_CKDNV_/normalFile_PERM_WVND_.data' );
#but not on server
system("rm -r " . localDir(). "readonlyDirectory_PERM_M_/moved_PERM_CK_");
assertLocalAndRemoteDir( '', 0);
system("sqlite3 " . localDir().'.csync_journal.db .dump');
cleanup();
+22 -19
Ver Arquivo
@@ -1,42 +1,45 @@
Setting up an Account
=====================
If no account has been configured, the ownCloud Client automatically assist in
connecting to your ownCloud server after the application has been started.
If no account has been configured, the ownCloud Client will automatically
assist in connecting to your ownCloud server after the application has been
started.
To set up an account:
1. Specify the URL to your Server. This is the same address that is used in the browser.
As a first step, specify the URL to your Server. This is the same address
that is used in the browser.
.. image:: images/wizard_url.png
:scale: 50 %
.. note:: Make sure to use ``https://`` if the server supports it. Otherwise,
your password and all data will be transferred to the server unencrypted. This
makes it easy for third parties to intercept your communication, and getting
hold of your password!
your password and all data will be transferred to the server unencrypted.
This makes it easy for third parties to intercept your communication, and
getting hold of your password!
2. Enter the username and password. These are the same credentials used to log into the web interface.
Next, enter the username and password. These are the same credentials used
to log into the web interface.
.. image:: images/wizard_user.png
:scale: 50 %
3. Choose the folder with which you want the ownCloud Client to synchronize the
contents of your ownCloud account. By default, this is a folder called
`ownCloud`. This folder is created in the home directory.
Finally, choose the folder that ownCloud Client is supposed to sync the
contents of your ownCloud account with. By default, this is a folder
called `ownCloud`, which will be created in the home directory.
.. image:: images/wizard_targetfolder.png
:scale: 50 %
The synchronization between the root directories of the ownCloud server begins.
At this time, the synchronization between the root directories of the
ownCloud server will begin.
.. image:: images/wizard_overview.png
:scale: 50 %
When selecting a local folder that already contains data, you can choose from two options:
If selecting a local folder that already contains data, there are
two options that exist.
* :guilabel:`Keep local data`: When selected, the files in the local folder on
the client are synchronized to the ownCloud server.
* :guilabel:`Start a clean sync`: When selected, all files in the local folder on the
client are deleted. These files are not syncrhonized to the ownCloud server.
* Keep local data: If selected, the files in the local folder on the
client will be synced up to the ownCloud server.
* Start a clean sync: If selected, all files in the local folder on
the client will be deleted and therefore not synced to the ownCloud
server.
+119 -130
Ver Arquivo
@@ -1,96 +1,88 @@
Appendix B: History and Architecture
====================================
Appendix B: Architecture
========================
.. index:: architecture
.. index:: architecture
ownCloud provides desktop sync clients to synchronize the contents of local
directories from computers, tablets, and handheld devices to the ownCloud
server.
The ownCloud project provides desktop sync clients to synchronize the
contents of local directories on the desktop machines to the ownCloud.
Synchronization is accomplished using csync_, a bidirectional file
synchronizing tool that provides both a command line client as well as a
library. A special module for csync was written to synchronize with the
ownCloud built-in WebDAV server.
The syncing is done with csync_, a bidirectional file synchronizing tool which
provides both a command line client as well as a library. A special module for
csync was written to synchronize with ownClouds built-in WebDAV server.
The ownCloud sync client is based on a tool called *mirall*, initially written
by Duncan Mac Vicar. Later Klaas Freitag joined the project and enhanced it to
function with the ownCloud server.
The ownCloud sync client is based on a tool called mirall initially written by
Duncan Mac Vicar. Later Klaas Freitag joined the project and enhanced it to work
with ownCloud server.
The ownCloud Client software is written in C++ using the `Qt Framework`_. As a
result, the ownCloud Client runs on Linux, Windows, and MacOS.
ownCloud Client is written in C++ using the `Qt Framework`_. As a result, the
ownCloud Client runs on the three important platforms Linux, Windows and MacOS.
.. _csync: http://www.csync.org
.. _`Qt Framework`: http://www.qt-project.org
The Synchronization Process
---------------------------
The Sync Process
----------------
The process of synchronization keeps files in two separate repositories the same. When syncrhonized:
First it is important to recall what syncing is: It tries to keep the files
on two repositories the same. That means if a file is added to one repository
it is going to be copied to the other repository. If a file is changed on one
repository, the change is propagated to the other repository. Also, if a file
is deleted on one side, it is deleted on the other. As a matter of fact, in
ownCloud syncing we do not have a typical client/server system where the
server is always master.
- If a file is added to one repository it is copied to the other synchronized repository.
- When a file is changed in one repository, the change is propagated to any
syncrhonized other repositories- If a file is deleted in one repository, it
is deleted in any other.
This is the major difference to other systems like a file backup where just
changes and new files are propagated but files never get deleted.
It is important to note that the ownCloud synchronization process does not use
a typical client/server system where the server is always master. This is a
major difference between the ownCloud syncrhonizatin process and other systems
like a file backup, where only changes to files or folders and the addition of
new files are propagated, but these files and folders are never deleted unless
explicitly deleted in the backup.
The ownCloud Client checks both repositories for changes frequently after a
certain time span. That is refered to as a sync run. In between the local
repository is monitored by a file system monitor system that starts a sync run
immediately if something was edited, added or removed.
During synchronization, the ownCloud Client checks both repositories for
changes frequently. This process is referred to as a *sync run*. In between
sync runs, the local repository is monitored by a file system monitoring
process that starts a sync run immediately if something was edited, added, or
removed.
Sync by Time versus ETag
------------------------
.. index:: time stamps, file times, etag, unique id
Synchronization by Time versus ETag
-----------------------------------
.. index:: time stamps, file times, etag, unique id
Until the release of ownCloud 4.5 and ownCloud Client 1.1, the ownCloud
synchronization process employed a single file property -- the file modificatin
time -- to decide which file was newer and needed to be synchronized to the
other repository.
Until the release of ownCloud 4.5 and ownCloud Client 1.1, ownCloud employed
a single file property to decide which file is newer and hence needs to be
synced to the other repository: the files modification time.
The *modification timestamp* is part of the files metadata. It is available on
every relevant filesystem and is the typical indicator for a file change.
Modification timestamps do not require special action to create, and have a
general meaning. One design goal of csync is to not require a special server
component. This design goal is why csync was chosen as the backend component.
every relevant filesystem and is the natural indicator for a file change.
Modification timestamps do not require special action to create and have
a general meaning. One design goal of csync is to not require a special server
component, thats why it was chosen as the backend component.
To compare the modification times of two files from different systems, csync
must operate on the same base. Before ownCloud Client version 1.1.0, csync
required both device repositories to run on the exact same time. This
requirement was achieved through the use of enterprise standard `NTP time
synchronisation`_ on all machines.
To compare the modification times of two files from different systems,
it is needed to operate on the same base. Before version 1.1.0,
csync requires both sides running on the exact same time, which can
be achieved through enterprise standard `NTP time synchronisation`_ on all
machines.
Because this timing strategy is rather fragile without the use of NTP, ownCloud
4.5 introduced a unique number (for each file?) that changes whenever the file
changes. Although this number is a unique value, it is not a hash of the file.
Instead, it is a randomly chosen number, that is transmitted in the Etag_
field. Because the file number changes if the file changes, its use is
guaranteed to determine if one of the files has changed and, thereby, launching
a synchronization process.
Since this strategy is rather fragile without NTP, ownCloud 4.5 introduced a
unique number, which changes whenever the file changes. Although it is a unique
value, it is not a hash of the file, but a randomly chosen number, which it will
transmit in the Etag_ field. Since the file number is guaranteed to change if
the file changes, it can now be used to determine if one of the files has
changed.
.. note:: ownCloud Client release 1.1 and later requires file ID capabilities
on the ownCloud server. Servers that run with release earlier than 4.5.0 do
not support using the file ID functionality.
.. note:: ownCloud Client 1.1 and newer require file ID capabilities on the
ownCloud server, hence using them with a server earlier than 4.5.0 is
not supported.
Before the 1.3.0 release of the Desktop Client, the synchronization process
might create faux conflict files if time deviates. Original and changed files
conflict only in their timestamp, but not in their content. This behaviour was
changed to employ a binary check if files differ.
Before the 1.3.0 release of the client the sync process might create faux
conflict files if time deviates. The original and the conflict files only
differed in the timestamp, but not in content. This behaviour was changed
towards a binary check if the files are different.
Like files, directories also hold a unique ID that changes whenever one of the
contained files or directories is modified. Because this is a recursive
process, it significantly reduces the effort required for a synchronization
cycle, because the client only analyzes directories with a modified ID.
Just like files, directories also hold a unique id, which changes whenever
one of the contained files or directories gets modified. Since this is a
recursive process, it significantly reduces the effort required for a sync
cycle, because the client will only walk directories with a modified unique id.
The following table outlines the different synchronization methods used,
depending on server/client combination:
This table outlines the different sync methods attempted depending
on server/client combination:
.. index:: compatiblity table
@@ -106,10 +98,10 @@ depending on server/client combination:
| 4.5 or later | 1.1 or later | File ID, Time Stamp |
+--------------------+-------------------+----------------------------+
We strongly recommend using ownCloud Server release 4.5 or later when using
ownCloud Client 1.1 or later. Using incompatible time stamp-based
synchronization mechanism can lead to data loss in rare cases, especially when
multiple clients are involved and one utilizes a non-synchronized NTP time.
It is highly recommended to upgrade to ownCloud 4.5 or later with ownCloud
Client 1.1 or later, since the time stamp-based sync mechanism can
lead to data loss in certain edge-cases, especially when multiple clients
are involved and one of them is not in sync with NTP time.
.. _`NTP time synchronisation`: http://en.wikipedia.org/wiki/Network_Time_Protocol
.. _Etag: http://en.wikipedia.org/wiki/HTTP_ETag
@@ -117,28 +109,27 @@ multiple clients are involved and one utilizes a non-synchronized NTP time.
Comparison and Conflict Cases
-----------------------------
As mentioned above, during a *sync run* the client must first detect if one of
the two repositories have changed files. On the local repository, the client
traverses the file tree and compares the modification time of each file with an
expected value stored in its database. If the value is not the same, the client
determines that the file has been modified in the local repository.
In a sync run the client first has to detect if one of the two repositories have
changed files. On the local repository, the client traverses the file
tree and compares the modification time of each file with the value it was
before. The previous value is stored in the client's database. If it is not, it
means that the file has been added to the local repository. Note that on
the local side, the modificaton time a good attribute to detect changes because
it does not depend on time shifts and such.
.. note:: On the local side, the modificaton time a good attribute to use for detecting changes, because
the value does not depend on time shifts and such.
For the remote (ie. ownCloud) repository, the client compares the ETag of each
file with it's previous value. Again the previous value is queried from the
database. If the ETag is still the same, the file has not changed.
For the remote (that is, ownCloud server) repository, the client compares the
ETag of each file with its expected value. Again, the expected ETag value is
queried from the client database. If the ETag is the same, the file has not
changed and no synchronization occurs.
In case a file has changed on both, the local and the remote repository since
the last sync run, it can not easily be decided which version of the file is
the one that should be used. However, changes to any side must not be lost.
In the event a file has changed on both the local and the remote repository
since the last sync run, it can not easily be decided which version of the file
is the one that should be used. However, changes to any side be lost. Instead,
a *conflict case* is created. The client resolves this conflic by creating a
conflict file of the older of the two files and saving the newer file under the
original file name. Conflict files are always created on the client and never
on the server. The conflict file uses the same name as the original file, but
is appended with the timestamp of the conflict detection.
That is called a **conflict case**. The client solves it by creating a conflict
file of the older of the two files and save the newer one under the original
file name. Conflict files are always created on the client and never on the
server. The conflict file has the same name as the original file appended with
the timestamp of the conflict detection.
.. _ignored-files-label:
@@ -146,40 +137,40 @@ is appended with the timestamp of the conflict detection.
Ignored Files
-------------
The ownCloud Client supports the ability to exclude or ignore certain files
from the synchronization process. Some system wide file patterns that are used
to exclude or ignore files are included with the client by default and the
ownCloud Client provides the ability to add custom patterns.
ownCloud Client supports that certain files are excluded or ignored from
the synchronization. There are a couple of system wide file patterns which
come with the client. Custom patterns can be added by the user.
By default, the ownCloud Client ignores the following files:
ownCloud Client will ignore the following files:
- Files matched by one of the patterns defined in :ref:`ignoredFilesEditor-label`.
- Files containing characters that do not work on certain file systems (`\, :, ?, *, ", >, <, |`).
* Files starting in ``.csync_journal.db*``, as these files are reserved for journalling.
* Files matched by one of the pattern in :ref:`ignoredFilesEditor-label`
* Files containing characters that do not work on certain file systems.
Currently, these characters are: `\, :, ?, *, ", >, <, |`
* Files starting in ``.csync_journal.db*`` (reserved for journalling)
If a pattern selected using a checkbox in the `ignoredFilesEditor-label` (or if
a line in the exclude file starts with the character `]` directly followed by
the file pattern), files matching the pattern are considered *fleeting meta
data*. These files are ingored and *removed* by the client if found in the
synchronized folder. This is suitable for meta files created by some
If a pattern is checkmarked in the `ignoredFilesEditor-label` (or if a line in
the exclude file starts with the character `]` directly followed
by the file pattern), files matching this pattern are considered fleeting
meta data. These files are ingored and *removed* by the client if found
in the sync folder. This is suitable for meta files created by some
applications that have no sustainable meaning.
If a pattern ends with the backslash (`/`) character, only directories are
matched. The pattern is only applied for directory components of filenames
selected using the checkbox.
If a pattern is ending with character `/` it means that only directories are
matched. The pattern is only applied for directory components of the checked
filename.
To match filenames against the exclude patterns, the unix standard C library
function fnmatch is used. This procesx checks the filename against the
specified pattern using standard shell wildcard pattern matching. For more
information, please refer to `The opengroup website
<http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_13_01>`.
To match file names against the exclude patterns, the unix standard C
library function fnmatch is used. It checks the filename against the pattern
using standard shell wildcard pattern matching. Check `The opengroup website
<http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_13_01>`
for the gory details.
The path that is checked is the relative path under the sync root directory.
**Pattern and File Match Examples:**
The path that is checked is the relative path unter the sync root directory.
Examples:
^^^^^^^^^
+-----------+------------------------------+
| Pattern | File Matches |
| Pattern | Matches |
+===========+==============================+
| ``~$*`` | ``~$foo``, ``~$example.doc`` |
+-----------+------------------------------+
@@ -192,17 +183,15 @@ The path that is checked is the relative path under the sync root directory.
The Sync Journal
----------------
The client stores the ETag number in a per-directory database, called the
*journal*. This database is a hidden file contained in the directory to be
synchronized.
The client stores the ETag number in a per-directory database,
called the journal. It is a hidden file right in the directory
to be synced.
If the journal database is removed, the ownCloud Client CSync backend rebuilds
the database by comparing the files and their modification times. This process
ensures that both server and client are synchronized using the appropriate NTP
time before restarting the client following a database removal.
If the journal database gets removed, ownCloud Client's CSync backend will
rebuild the database by comparing the files and their modification times. Thus
it should be made sure that both server and client synchronized with NTP time
before restarting the client after a database removal.
Pressing ``F5`` while in the Account Settings Dialog enables you to "reset" the
journal. This function can be used to recreate the journal database.
.. note:: We recommend that you use this function only when advised to do so by
ownCloud support staff.
Pressing ``F5`` in the Account Settings Dialog that allows to "reset" the
journal. That can be used to recreate the journal database. Use this only
if advised to do so by the developer or support staff.
+47 -92
Ver Arquivo
@@ -1,126 +1,81 @@
The Automatic Updater
=====================
To ensure that you are always using the latest version of the ownCloud client,
an auto-update mechanism has been added in Version 1.5.1. The Automatic Updater
ensures that you automatically profit from the latest features and bugfixes.
To ensure you're always using the latest version of ownCloud Client, an
auto-update mechanism has been added in Version 1.5.1. It will ensure
that will automatically profit from the latest features and bugfixes.
.. note:: The Automatic Updater functions differently, depending on the operating system.
The updater works differently depending on the operating system.
Basic Workflow
--------------
The following sections describe how to use the Automatic Updater on different operating systems:
Windows
^^^^^^^
The ownCloud client checks for updates and downloads them when available. You
can view the update status under ``Settings -> General -> Updates`` in the
ownCloud client.
ownCloud client will check for updates and download the update if one
is available. You can view the status under ``Settings -> General -> Updates``.
If an update is available and has been successfully downloaded, ownCloud
Client will start a silent update prior to its next launch and then start itself.
If the silent update fails, the client offers a manual download.
If an update is available, and has been successfully downloaded, the ownCloud
client starts a silent update prior to its next launch and then restarts
itself. Should the silent update fail, the client offers a manual download.
.. note:: Administrative privileges are required to perform the update.
.. note:: The user needs to be able to attain administrative privileges
to successfully perform the update.
Mac OS X
^^^^^^^^
If a new update is available, the ownCloud client initializes a pop-up dialog
to alert you of the update and requesting that you update to the latest
version. Due to their use of the Sparkle frameworks, this is the default
process for Mac OS X applications.
If a new update is available, ownCloud client will ask the user to update
to the latest version using a pop-up dialog. This is the default for Mac
OS X applications which use the Sparkle framework.
Linux
^^^^^
Linux distributions provide their own update tool, so ownCloud clients that use
the Linux operating system do not perform any updates on their own. Linux
operating systems do, however, check for the latest version of the ownCloud
client and passively notify the user (``Settings -> General -> Updates``) when
an update is available.
Since distributions provide their own update tool, ownCloud Client on Linux
will not perform any updates on its own. It will, however, check for the
latest version and passively notify the user (``Settings -> General -> Updates``)
if an update is available.
Preventing Automatic Updates
----------------------------
Preventing Auto Updates
-----------------------
In controlled environments, such as companies or universities, you might not
want to enable the auto-update mechanism, as it interferes with controlled
deployment tools and policies. To address this case, it is possible to disable
the auto-updater entirely. The following sections describe how to disable the
auto-update mechanism for different operating systems.
In controlled environment such as companies or universities, the auto-update
mechanism might not be desired as it interferes with controlled deployment
tools and policies. In this case, it is possible to disable the auto-updater
entirely:
Preventing Automatic Updates in Windows Environents
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Windows
^^^^^^^
You can prevent automatic updates from occuring in Windows environments using
one of two methods. The first method allows users to override the automatic
update check mechanism whereas the second method prevents any manual overrides.
There are two alternative approaches:
To prevent automatic updates, but allow manual overrides:
1. In ``HKEY_LOCAL_MACHINE\Software\ownCloud\ownCloud``, add a key ``skipUpdateCheck`` (of type DWORD) with the value 1 to the machine. This key
can be manually overrideen by the same value in ``HKEY_CURRENT_USER``.
1. Migrate to the following directory::
2. In ``HKEY_LOCAL_MACHINE\Software\Policies\ownCloud\ownCloud``, add a key
``skipUpdateCheck`` (of type DWORD) with the value 1 to the machine.
Setting the value here cannot be overridden by the user and is the preferred
way to control the updater behavior via Group Policies.
HKEY_LOCAL_MACHINE\Software\ownCloud\ownCloud
Mac OS X
^^^^^^^^
2. Add the key ``skipUpdateCheck`` (of type DWORD).
3. Specify a value of ``1`` to the machine.
To manually override this key, use the same value in ``HKEY_CURRENT_USER``.
To prevent automatic updates and disallow manual overrides:
.. note::This is the preferred method of controlling the updater behavior using Group Policies.
1. Migrate to the following directory::
HKEY_LOCAL_MACHINE\Software\Policies\ownCloud\ownCloud
2. Add the key ``skipUpdateCheck`` (of type DWORD).
3. Specify a value of ``1`` to the machine.
Preventing Automatic Updates in Mac OS X Environments
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
You can disable the automatic update mechanism in MAC OS X operating systems
using the system-wide ``.plist`` file. To access this file:
1. Using the Windows explorer, migrate to the following location::
/Library/Preferences/
2. Locate and open the following file::
com.owncloud.desktopclient.plist
3. Add a new root level item of type ``bool``.
4. Name the item ``skipUpdateCheck``.
5. Set the item to ``true``.
Alternatively, you can copy the file
``owncloud.app/Contents/Resources/deny_autoupdate_com.owncloud.desktopclient.plist``
You can disable the update check via a system-wide ``.plist`` file located
at ``/Library/Preferences/com.owncloud.desktopclient.plist``. Add a new root
level item of type bool and the name ``skipUpdateCheck`` and set it to ``true``.
You can also just copy the file
``owncloud.app/Contents/Resources/deny_autoupdate_com.owncloud.desktopclient.plist```
to ``/Library/Preferences/com.owncloud.desktopclient.plist``.
Preventing Automatic Updates in Linux Environments
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Linux
^^^^^
Because Linux does not provide automatic updating functionality, there is no
need to remove the automatic-update check. However, if you want to disable
this check:
Since there is no updating functionality, there is no need to remove the check.
If you want to disable the check nontheless, open a file called
``/etc/ownCloud/ownCloud.conf`` and add the following content::
1. Locate and open the following file::
/etc/ownCloud/ownCloud.conf
2. Add the following content to the file::
[General]
skipUpdateCheck=true
[General]
skipUpdateCheck=true
+72 -88
Ver Arquivo
@@ -3,20 +3,20 @@
Appendix A: Building the Client
===============================
This section explains how to build the ownCloud Client from source for all
major platforms. You should read this section if you want to develop for the
desktop client.
This section explains how to build the ownCloud Client from source
for all major platforms. You should read this section if you want
to development on the desktop client.
.. note:: Building instruction are subject to change as development proceeds.
Please check the version for which you want to built.
Note that the building instruction are subject to change as development
proceeds. It is important to check the version which is to built.
The instructions contained in this topic were updated to work with version 1.5 of the ownCloud Client.
This instructions were updated to work with ownCloud Client 1.5.
Linux
-----
1. Add the `ownCloud repository from OBS`_.
2. Install the dependencies (as root, or using ``sudo``) using the following commands for your specific Linux distribution:
2. Install the dependencies (as root, or via sudo):
* Debian/Ubuntu: ``apt-get update; apt-get build-dep owncloud-client``
* openSUSE: ``zypper ref; zypper si -d owncloud-client``
@@ -27,51 +27,47 @@ Linux
Mac OS X
--------
In additon to needing XCode (along with the command line tools), developing in
the MAC OS X environment requires extra dependencies. You can install these
dependencies through MacPorts_ or Homebrew_. These dependencies are required
only on the build machine, because non-standard libs are deployed in the app
bundle.
Next to XCode (and the command line tools!), you will need some
extra dependencies.
The tested and preferred way to develop in this environment is through the use
of HomeBrew_. The ownCloud team has its own repository containing non-standard
recipes.
You can install these dependencies via MacPorts_ or Homebrew_.
This is only needed on the build machine, since non-standard libs
will be deployed in the app bundle.
To set up your build enviroment for development using HomeBrew_:
1. Add the ownCloud repository using the following command::
The tested and preferred way is to use HomeBrew_. The ownCloud team has
its own repository which contains non-standard recipes. Add it with::
brew tap owncloud/owncloud
2. Install any missing dependencies::
Next, install the missing dependencies::
brew install $(brew deps mirall)
To build mirall, follow the `generic build instructions`_.
.. note:: Because the product from the mirall build is an app bundle, do not
call ``make install`` at any time. Instead, call ``make package`` to create an
install-ready disk image.
.. note::
You should not call ``make install`` at any time, since the product of the
mirall build is an app bundle. Call ``make package`` instead to create an
install-ready disk image.
Windows (Cross-Compile)
Windows (cross-compile)
-----------------------
Due to the large number of dependencies, building the client for Windows is
**currently only supported on openSUSE**, by using the MinGW cross compiler.
You can set up openSUSE 12.1, 12.2, or 13.1 in a virtual machine if you do not
have it installed already.
Due to the amount of dependencies, building the client for Windows
is **currently only supported on openSUSE**, by using the MinGW
cross compiler. You can set up openSUSE 12.1, 12.2 or 13.1 in a virtual machine
if you do not have it installed already.
To cross-compile:
In order to cross-compile, the following repositories need to be added
via YaST or ``zypper ar`` (adjust when using openSUSE 12.2 or 13.1)::
1. Add the following repositories using YaST or ``zypper ar`` (adjust when using openSUSE 12.2 or 13.1):
zypper ar http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_13.1/windows:mingw:win32.repo
zypper ar http://download.opensuse.org/repositories/windows:/mingw/openSUSE_13.1/windows:mingw.repo
- ``zypper ar http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_13.1/windows:mingw:win32.repo``
Next, install the cross-compiler packages and the cross-compiled dependencies::
- ``zypper ar http://download.opensuse.org/repositories/windows:/mingw/openSUSE_13.1/windows:mingw.repo``
2. Install the cross-compiler packages and the cross-compiled dependencies::
``zypper install cmake make mingw32-cross-binutils mingw32-cross-cpp mingw32-cross-gcc \
zypper install cmake make mingw32-cross-binutils mingw32-cross-cpp mingw32-cross-gcc \
mingw32-cross-gcc-c++ mingw32-cross-pkg-config mingw32-filesystem \
mingw32-headers mingw32-runtime site-config mingw32-libqt4-sql \
mingw32-libqt4-sql-sqlite mingw32-sqlite mingw32-libsqlite-devel \
@@ -82,86 +78,74 @@ To cross-compile:
mingw32-libpng-devel mingw32-libsqlite mingw32-qtkeychain \
mingw32-qtkeychain-devel mingw32-dlfcn mingw32-libintl-devel \
mingw32-libneon-devel mingw32-libopenssl-devel mingw32-libproxy-devel \
mingw32-libxml2-devel mingw32-zlib-devel``
mingw32-libxml2-devel mingw32-zlib-devel
3. For the installer, install the NSIS installer package::
For the installer, the NSIS installer package is also required::
``zypper install mingw32-cross-nsis``
zypper install mingw32-cross-nsis
4. Install the following plugin::
.. Usually, the following would be needed as well, but due to a bug in mingw, they
will currently not build properly from source.
``mingw32-cross-nsis-plugin-processes mingw32-cross-nsis-plugin-uac``
mingw32-cross-nsis-plugin-processes mingw32-cross-nsis-plugin-uac
.. note:: This plugin is typically required. However, due to a current bug
in ``mingw``, the plugins do not currently build properly from source.
You will also need to manually download and install the following files with
``rpm -ivh <package>`` (They will also work with openSUSE 12.2 and newer)::
5. Manually download and install the following files using ``rpm -ivh <package>``:
rpm -ihv http://download.tomahawk-player.org/packman/mingw:32/openSUSE_12.1/x86_64/mingw32-cross-nsis-plugin-processes-0-1.1.x86_64.rpm
rpm -ihv http://download.tomahawk-player.org/packman/mingw:32/openSUSE_12.1/x86_64/mingw32-cross-nsis-plugin-uac-0-3.1.x86_64.rpm
..note:: These files operate using openSUSE 12.2 and newer.
Now, follow the `generic build instructions`_, but pay attention to
the following differences:
- ``rpm -ihv http://download.tomahawk-player.org/packman/mingw:32/openSUSE_12.1/x86_64/mingw32-cross-nsis-plugin-processes-0-1.1.x86_64.rpm``
For building for windows a special toolchain file has to be specified.
That makes cmake finding the platform specific tools. This parameter
has to be added to the call to cmake:
- ``rpm -ihv http://download.tomahawk-player.org/packman/mingw:32/openSUSE_12.1/x86_64/mingw32-cross-nsis-plugin-uac-0-3.1.x86_64.rpm``
``-DCMAKE_TOOLCHAIN_FILE=../mirall/admin/win/Toolchain-mingw32-openSUSE.cmake``
6. Follow the `generic build instructions`_
.. note:: When building for Windows platforms, you must specify a special
toolchain file that enables cmake to locate the platform-specific tools. To add
this parameter to the call to cmake, enter
``DCMAKE_TOOLCHAIN_FILE=../mirall/admin/win/Toolchain-mingw32-openSUSE.cmake``.
7. Build by running ``make``.
..note:: Using ``make package`` produces an NSIS-based installer, provided
the NSIS mingw32 packages are installed.
Finally, just build by running ``make``. ``make package`` will produce
an NSIS-based installer, provided the NSIS mingw32 packages are installed.
Generic Build Instructions
--------------------------
.. _`generic build instructions`
Compared to previous versions, building Mirall has become easier. Unlike
earlier versions, CSync, which is the sync engine library of Mirall, is now
part of the Mirall source repository and not a separate module.
Compared to previous versions building of Mirall has become more easy.
CSync, which is the sync engine library of Mirall, is now part of the
Mirall source repository, not, like it was before, a separate module.
You can download Mirall from the ownCloud `Client Download Page`_.
Mirall can be downloaded at ownCloud's `Client Download Page`_.
To build the most up to date version of the client:
If you want to build the leading edge version of the client, you should
use the latest versions of Mirall via Git_, like so::
1. Clone the latest versions of Mirall from Git_ as follows:
git clone git://github.com/owncloud/mirall.git
``git clone git://github.com/owncloud/mirall.git``
Next, create build directories::
2. Create build directories:
mkdir mirall-build
``mkdir mirall-build``
Now build mirall::
3. Build mirall:
cd ../mirall-build
cmake -DCMAKE_BUILD_TYPE="Debug" ../mirall
``cd ../mirall-build``
``cmake -DCMAKE_BUILD_TYPE="Debug" ../mirall``
Note that it is important to use absolute pathes for the include- and library
directories. If this succeeds, call ``make``. The owncloud binary should appear
in the ``bin`` directory. You can also run ``make install`` to install the client to
``/usr/local/bin``.
..note:: You must use absolute pathes for the ``include`` and ``library`` directories.
To build an installer/app bundle (requires the mingw32-cross-nsis packages on Windows)::
4. Call ``make``.
make package
The owncloud binary appear in the ``bin`` directory.
Known cmake parameters:
5. (Optional) Call ``make install`` to install the client to the ``/usr/local/bin`` directory.
6. (Optional) Call ``make package`` to build an installer/app bundle
..note:: This step requires the ``mingw32-cross-nsis`` packages be installed on Windows.
The following are known cmake parameters:
* ``QTKEYCHAIN_LIBRARY=/path/to/qtkeychain.dylib -DQTKEYCHAIN_INCLUDE_DIR=/path/to/qtkeychain/``:
Used for stored credentials. When compiling with Qt5, the library is called ``qt5keychain.dylib.``
You need to compile QtKeychain with the same Qt version.
* ``WITH_DOC=TRUE``: Creates doc and manpages through running ``make``; also
* adds install statements, providing the ability to install using ``make
* install``.
* ``CMAKE_PREFIX_PATH=/path/to/Qt5.2.0/5.2.0/yourarch/lib/cmake/``: Builds using Qt5.
* ``BUILD_WITH_QT4=ON``: Builds using Qt4 (even if Qt5 is found).
* QTKEYCHAIN_LIBRARY=/path/to/qtkeychain.dylib -DQTKEYCHAIN_INCLUDE_DIR=/path/to/qtkeychain/: Use QtKeychain for stored credentials. When compiling with Qt5, the library is called qt5keychain.dylib. You need to compile QtKeychain with the same Qt version.
* WITH_DOC=TRUE: create doc and manpages via running ``make``; also adds install statements to be able to install it via ``make install``.
* CMAKE_PREFIX_PATH=/path/to/Qt5.2.0/5.2.0/yourarch/lib/cmake/ : to build with Qt5
* BUILD_WITH_QT4=ON : to build with Qt4 even if Qt5 is found
.. _`ownCloud repository from OBS`: http://software.opensuse.org/download/package?project=isv:ownCloud:devel&package=owncloud-client
.. _CSync: http://www.csync.org
+13 -11
Ver Arquivo
@@ -1,24 +1,26 @@
The ownCloud Client reads a configuration file. You can locate this configuration files as follows:
ownCloud Client reads a configuration file.
- On Linux distributions:
On Linux it can be found in:
``$HOME/.local/share/data/ownCloud/owncloud.cfg``
- In Microsoft Windows systems:
On Windows it can be found in:
``%LOCALAPPDATA%\ownCloud\owncloud.cfg``
- In MAC OS X systems:
On Mac it can be found in:
``$HOME/Library/Application Support/ownCloud``
The configuration file contains settings using the Microsoft Windows .ini file
format. You can overwrite changes using the ownCloud configuration dialog.
It contains settings in the ini file format known from Windows.
.. note:: Use caution when making changes to the ownCloud Client configuration
file. Incorrect settings can produce unintended results.
.. note:: Changes here should be done carefully as wrong settings can cause disfunctionality.
You can change the following configuration settings:
.. note:: Changes may be overwritten by using ownCloud's configuration dialog.
- ``remotePollInterval`` (default: ``30000``) -- Specifies the poll time for the remote repository in milliseconds.
These are config settings that may be changed:
- ``maxLogLines`` (default: ``20000``) -- Specifies the maximum number of log lines displayed in the log window.
``remotePollInterval`` (default: ``30000``)
Poll time for the remote repository in milliseconds
``maxLogLines`` (default: ``20000``)
Maximum count of log lines shown in the log window
+9 -10
Ver Arquivo
@@ -1,17 +1,16 @@
FAQ
===
**Issue:**
Some files are continuously uploaded to the server, even when they are not modified.
**Resolution:**
Some files are continuously uploaded to the server even when they are not modified
----------------------------------------------------------------------------------
It is possible that another program is changing the modification date of the file.
If the file is uses the ``.eml`` extention, Windows automatically and
continually changes all files, unless you remove
``\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PropertySystem\PropertyHandlers`
from the windows registry.
If the file is a ``.eml`` file, Windows automatically change all file all the time unless you remove
``\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PropertySystem\PropertyHandlers`` from
the windows registry.
See http://petersteier.wordpress.com/2011/10/22/windows-indexer-changes-modification-dates-of-eml-files/
See http://petersteier.wordpress.com/2011/10/22/windows-indexer-changes-modification-dates-of-eml-files/ for more information.
Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 34 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 34 KiB

Antes

Largura:  |  Altura:  |  Tamanho: 21 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 21 KiB

Antes

Largura:  |  Altura:  |  Tamanho: 19 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 19 KiB

Antes

Largura:  |  Altura:  |  Tamanho: 30 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 30 KiB

Antes

Largura:  |  Altura:  |  Tamanho: 25 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 25 KiB

Antes

Largura:  |  Altura:  |  Tamanho: 33 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 33 KiB

Antes

Largura:  |  Altura:  |  Tamanho: 28 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 28 KiB

Antes

Largura:  |  Altura:  |  Tamanho: 30 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 30 KiB

Antes

Largura:  |  Altura:  |  Tamanho: 33 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 33 KiB

Antes

Largura:  |  Altura:  |  Tamanho: 1.1 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 1.1 KiB

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 43 KiB

Antes

Largura:  |  Altura:  |  Tamanho: 7.0 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 7.0 KiB

Antes

Largura:  |  Altura:  |  Tamanho: 34 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 34 KiB

Antes

Largura:  |  Altura:  |  Tamanho: 33 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 33 KiB

Antes

Largura:  |  Altura:  |  Tamanho: 24 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 24 KiB

Antes

Largura:  |  Altura:  |  Tamanho: 1.6 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 1.6 KiB

Antes

Largura:  |  Altura:  |  Tamanho: 32 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 32 KiB

Antes

Largura:  |  Altura:  |  Tamanho: 40 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 40 KiB

Antes

Largura:  |  Altura:  |  Tamanho: 36 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 36 KiB

Antes

Largura:  |  Altura:  |  Tamanho: 32 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 32 KiB

Antes

Largura:  |  Altura:  |  Tamanho: 71 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 71 KiB

Antes

Largura:  |  Altura:  |  Tamanho: 46 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 46 KiB

Antes

Largura:  |  Altura:  |  Tamanho: 12 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 12 KiB

Arquivo binário não exibido.

Antes

Largura:  |  Altura:  |  Tamanho: 66 KiB

Antes

Largura:  |  Altura:  |  Tamanho: 13 KiB

Depois

Largura:  |  Altura:  |  Tamanho: 13 KiB

+2 -3
Ver Arquivo
@@ -4,12 +4,11 @@ Contents
========
.. toctree::
:maxdepth: 3
:maxdepth: 2
introduction
installing
accountsetup
navigating
visualtour
advancedusage
autoupdate
-208
Ver Arquivo
@@ -1,208 +0,0 @@
.. _installing-linux:
Installing the Linux Desktop Client
===================================
The ownCloud Desktop Client is provided for a wide range of Linux
distributions. The following table provides a list of Linux operating systems
and the specific distributions on which you can install the Desktop Client.
+------------------+-------------------------+
| Operating System | Distribution |
+==================+=========================+
| CentOS (Redhat) | - Red Hat RHEL-6 |
| | - CentOS CentOS-6 |
+------------------+-------------------------+
| Debian | - Debian 7.0 |
| | - Fedora 19 |
| | - Fedora 20 |
+------------------+-------------------------+
| openSUSE | - openSUSE |
| | - Factory PPC |
| | - openSUSE Factory ARM |
| | - openSUSE Factory |
| | - openSUSE 13.1 Ports |
| | - openSUSE 13.1 |
| | - openSUSE 12.3 Ports |
| | - openSUSE 12.3 |
| | - openSUSE 12.2 |
+------------------+-------------------------+
| SUSE (SLE) | - SLE 11 SP3 |
+------------------+-------------------------+
| Ubuntu | - xUbuntu 14.04 |
| | - xUbuntu 13.10 |
| | - xUbuntu 12.10 |
| | - xUbuntu 12.04 |
+------------------+-------------------------+
General instructions for how to install the ownCloud Desktop Client on any
supported Linux distribution can be found on the `ownCloud download page
<http://software.opensuse.org/download/package?project=isv:ownCloud:desktop&package=owncloud-client>`_.
Linux Installation Methods
--------------------------
You can install the ownCloud Desktop Client using either of the following three methods:
- One Click Install (openSUSE and SUSE SLE distributions only) — Installs the
ownCloud Desktop using a bundled installation package.
- Adding the ownCloud package repository — Installs the ownCloud Desktop client
using a Linux terminal and keeps it up to date using the distribution's
package manager.
.. note::
Manual command line installation requires that you perform the installation as root.
- Binary package — Installs the ownCloud Desktop Client using a raw binary package.
Installing the Desktop Client on Redhat or CentOS Linux Operating Systems
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To install the ownCloud Desktop Client on a Redhat or CentOS operating system manually:
1. Open a Linux terminal window.
2. Specify the directory in which you want to install the client.
``cd /etc/yum.repos.d/``
3. Choose and download the client for your specific distribution:
* Red Hat RHEL-6: ``wget http://download.opensuse.org/repositories/isv:ownCloud:desktop/RedHat_RHEL-6/isv:ownCloud:desktop.repo``
* CentOS CentOS-6: ``wget http://download.opensuse.org/repositories/isv:ownCloud:desktop/CentOS_CentOS-6/isv:ownCloud:desktop.repo``
4. Install the client.
``yum install owncloud-client``
5. After the installation completes, go to Setting Up the ownCloud Desktop Client.
**Installing the Desktop Client on Debian 7.0 Linux Operating Systems Manually**
To install the ownCloud Desktop Client on the Debian 7.0 distribution manually:
1. Open a Linux terminal window.
2. Download the client.
``echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Debian_7.0/ /' >> /etc/apt/sources.list.d/owncloud-client.list``
3. Download the package lists from any repositories and updates them to ensure the latest package versions and their dependencies.
``apt-get update``
4. Install the client.
``apt-get install owncloud-client``
5. (Optional) Download the apt-key for the Debian repository
``wget http://download.opensuse.org/repositories/isv:ownCloud:desktop/Debian_7.0/Release.key``
6. After the installation completes, go to Setting Up the ownCloud Desktop Client.
Installing the Desktop Client on Fedora Linux Operating Systems
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To install the ownCloud Desktop Client on the Fedora operating system manually:
1. Open a Linux terminal window.
2. Specify the directory in which you want to install the client.
cd /etc/yum.repos.d/
3. Choose and download the client for your specific distribution
* Fedora 19: ``wget http://download.opensuse.org/repositories/isv:ownCloud:desktop/Fedora_19/isv:ownCloud:desktop.repo``
* Fedora 20: ``wget http://download.opensuse.org/repositories/isv:ownCloud:desktop/Fedora_20/isv:ownCloud:desktop.repo``
4. Install the client.
``yum install owncloud-client``
5. After the installation completes, go to Setting Up the ownCloud Desktop Client.
Installing the Desktop Client on openSUSE Linux Operating Systems
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To install the ownCloud Desktop Client on the openSUSE operating system manually:
1. Open a Linux terminal window.
2. Choose and download the client for your specific distribution:
* Factory PPC: ``zypper addrepo http://download.opensuse.org/repositories/isv:ownCloud:desktop/openSUSE_Factory_PPC/isv:ownCloud:desktop.repo``
* **Factory ARM**: ``zypper addrepo http://download.opensuse.org/repositories/isv:ownCloud:desktop/openSUSE_Factory_ARM/isv:ownCloud:desktop.repo``
* **Factory**: ``zypper addrepo http://download.opensuse.org/repositories/isv:ownCloud:desktop/openSUSE_Factory/isv:ownCloud:desktop.repo``
* **13.1 Ports**: ``zypper addrepo http://download.opensuse.org/repositories/isv:ownCloud:desktop/openSUSE_13.1_Ports/isv:ownCloud:desktop.repo``
* **13.1**: ``zypper addrepo http://download.opensuse.org/repositories/isv:ownCloud:desktop/openSUSE_13.1/isv:ownCloud:desktop.repo``
* **12.3 Ports**: ``zypper addrepo http://download.opensuse.org/repositories/isv:ownCloud:desktop/openSUSE_12.3_Ports/isv:ownCloud:desktop.repo``
* **12.3**: ``zypper addrepo http://download.opensuse.org/repositories/isv:ownCloud:desktop/openSUSE_12.3/isv:ownCloud:desktop.repo``
* **12.2**: ``zypper addrepo http://download.opensuse.org/repositories/isv:ownCloud:desktop/openSUSE_12.2/isv:ownCloud:desktop.repo``
3. Download any package metadata from the medium and store it in local cache.
``zypper refresh``
4. Install the client.
``zypper install owncloud-client``
5. After the installation completes, go to Setting Up the ownCloud Desktop Client.
Installing the Desktop Client on SLE Linux Operating Systems
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To install the ownCloud Desktop Client on the SUSE Linux Enterprise (SLE) operating system.
1. Open a Linux terminal window.
2. Download the client.
``zypper addrepo http://download.opensuse.org/repositories/isv:ownCloud:desktop/SLE_11_SP3/isv:ownCloud:desktop.repo``
3. Download any package metadata from the medium and store it in local cache.
``zypper refresh``
4. Install the client.
``zypper install owncloud-client``
5. After the installation completes, go to Setting Up the ownCloud Desktop Client.
Installing the Desktop Client on Ubuntu Linux Operating Systems
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To install the ownCloud Desktop Client on the Ubuntu operating system:
1. Open a Linux terminal window.
2. Choose and download the client for your specific distribution:
* **xUbuntu 14.04**: ``sudo sh -c "echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/xUbuntu_14.04/ /' >> /etc/apt/sources.list.d/owncloud-client.list"``
* **xUbuntu 13.10**: ``sudo sh -c "echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/xUbuntu_13.10/ /' >> /etc/apt/sources.list.d/owncloud-client.list"``
* **xUbuntu 12.10**: ``sudo sh -c "echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/xUbuntu_12.10/ /' >> /etc/apt/sources.list.d/owncloud-client.list"``
* **xUbuntu 12.04**: ``sudo sh -c "echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/xUbuntu_12.04/ /' >> /etc/apt/sources.list.d/owncloud-client.list"``
3. Download the package lists from any repositories and updates them to ensure the latest package versions and their dependencies.
``apt-get update``
4. Install the client.
``sudo apt-get install owncloud-client``
5. (Optional) Download the apt-key for the Ubuntu repository:
* **xUbuntu 14.04**: ``wget http://download.opensuse.org/repositories/isv:ownCloud:desktop/xUbuntu_14.04/Release.key``
* **xUbuntu 13.10**: ``wget http://download.opensuse.org/repositories/isv:ownCloud:desktop/xUbuntu_13.10/Release.key``
* **xUbuntu 12.10**: ``wget http://download.opensuse.org/repositories/isv:ownCloud:desktop/xUbuntu_12.10/Release.key``
* **xUbuntu 12.04**: ``wget http://download.opensuse.org/repositories/isv:ownCloud:desktop/xUbuntu_12.04/Release.key``
6. (Optional) Add the apt key.
``sudo apt-key add - < Release.key``
7. After the installation completes, go to `Setting Up the ownCloud Desktop Client`_.
-4
Ver Arquivo
@@ -1,4 +0,0 @@
.. _installing-macosx:
Installing the MAC OSX Desktop Client
=====================================
-102
Ver Arquivo
@@ -1,102 +0,0 @@
.. _installing-windows:
Installing the Windows Desktop Client
=====================================
The ownCloud desktop client for Windows is provided as a Nullsoft Scriptable Install System (NSIS) setup file for machine-wide installation.
To install the ownCloud desktop client:
1. Access the ownCloud website.
The ownCloud web page opens.
.. image:: images/oc_website.png
ownCloud Web Page
2. Select Products > Desktop Clients from the website menu.
The Desktop Client download page opens.
.. image:: images/oc_client_download_options.png
Desktop client download selections
3. Click the 'Download for Windows' option.
The Desktop Client download page opens.
.. image:: images/oc_client_windows_download.png
ownCloud Windows Client Download
4. Click the 'download' button.
The Microsoft Windows client download begins. Depending on your browser
settings, the client installation file might launch automatically.
5. Once the download completes, locate the client installation file in your system Downloads folder.
6. Double-click the client installation file to start the download.
The Open File - Security Warning dialog box opens.
.. image:: images/security_warning_windows.png
Open File - Security Warning dialog box
7. Click 'Run' in the dialog box to begin the installation.
On systems running virus protection software, you might have to verify
that you want to install the ownCloud Desktop Client software.
8. Click 'Yes' to continue with the software installation.
The ownCloud Setup Wizard window opens.
.. image:: images/client_setup_wizard_main.png
ownCloud Setup Wizard Window
9. Click 'Next' to continue.
The Choose Components window opens.
.. image:: images/client_setup_wizard_components.png
Choose Components Window
10. Choose the components that you want to install for the Desktop Client.
All relevant components for your platform are selected by default.
However, you can choose to exlude different components from the installation.
11. Click Next to continue.
The Choose Install Location window opens.
.. image:: images/client_setup_wizard_location.png
Choose Install Location window
12. Verify the destination folder for the Desktop Client installation and then click Install.
The Installing window opens.
.. image:: images/client_setup_wizard_install_progress.png
Installing window
13. Once the installation completes, click 'Next' to continue.
The Setup Wizard Completion window opens.
.. image:: images/client_setup_wizard_install_finish.png
Completion window
You can choose to launch the Desktop Client from this window or launch the application at another time.
14. Click 'Finish' to complete the installation.
After the installation completes, go to Setting Up the ownCloud Desktop Client.
-13
Ver Arquivo
@@ -1,13 +0,0 @@
Installing the Synchronization Client
=====================================
The latest version of the ownCloud Synchronization Client can be obtained from
the `ownCloud Website <http://www.owncloud.com>`_. You can download and install
the client on Windows, MAC OSX, and various Linux software distrubutions. The
following sections describe specific support and installation procedures for
the different software platforms:
- :ref:`installing-windows`
- :ref:`installing-macosx`
- :ref:`installing-linux`
+26 -8
Ver Arquivo
@@ -1,14 +1,32 @@
Introduction
============
Available for Windows, MAC OS X, and various Linux distributions, the ownCloud
Sync client is a desktop program installed on your computer. The client enables
you to:
The ownCloud Sync Client is a desktop program installed on a users computer.
It allows a user to specify one or more directories on the local machine to
sync to the ownCloud server. It allows the user to always have the latest
files wherever they may be. When a change is made to the file on the
computer, it will sync to the ownCloud server via the sync client.
- Specify one or more directories on your computer that you want to synchronize
to the ownCloud server.
- Always have the latest files synchronized, wherever they are located.
The ownCloud Sync Client is available for Windows, MAC OS X, and various
Linux distributions.
Changes made to any synchronized file on the computer are automatically made to
the files on the ownCloud server using the sync client.
Obtaining the Client
--------------------
The latest version of the Client can be obtained on the ownCloud web site.
ownCloud client for **Windows** is provided as a NSIS-based setup file for
machine-wide install. Installing the ownCloud client on **Mac OS** follows
the normal app bundle installation pattern:
1. Download the installation file: Click ``ownCloud-x.y.z.dmg``, a window with
the ownCloud icon opens.
2. In that window, drag the ownCloud application into the ``Applications``
folder.
3. On the right hand side From ``Applications``, choose ``ownCloud``.
The ownCloud client is also provided as in a convenient repository for a wide
range of popular **Linux distributions**.
Supported distributions are Fedora, openSUSE, Ubuntu and Debian.
To support other distributions, a is required, see :ref:`building-label`
Arquivo binário não exibido.
-313
Ver Arquivo
@@ -1,313 +0,0 @@
Using the Synchronization Client
================================
.. index:: navigating, usage
The ownCloud Client remains in the background and is visible as an icon in the
system tray (Windows, KDE), status bar (MAC OS X), or notification area
(Ubuntu).
.. image:: images/icon.png
**ownCloud Desktop Client icon**
Using the Desktop Client Menu
-----------------------------
A right click on the icon (left click on Ubuntu and Mac OS X) provides the
following menu:
.. image:: images/menu.png
**ownCloud Desktop Client menu**
The Desktop Client menu provides the following options:
* ``Open ownCloud in browser``: Launches the ownCloud WEB interface.
* ``Open folder 'ownCloud'``: Opens the ownCloud local folder. If you have defined multiple synchronization targets, the window displays each local folder.
* **Disk space indicator**: Indicates the amount of space currently used on the server.
* Operation indicator: Displays the status of the current synchronization process or indicates ``Up to date`` if the server and client are in sync.
* **Recent Changes**: Displays the last six files modified by the synchronization operations and provides access to the current synchronization status listing all changes since the last restart of the ownCloud client.
* ``Settings...``: Provides access to the settings menu.
* ``Help``: Opens a browser to display ownCloud Desktop Client Guide.
* ``Sign out``: Disables the client from continued synchronizations.
* ``Quit ownCloud``: Quits the ownCloud Client, ending any currently running
synchronizations.
Using the Account Settings Window
---------------------------------
.. index:: account settings, user, password, Server URL
The ``Account`` window provides a summary for general settings associated with the ownCloud account. This window enalbes you to manage any synchronized folders in the account and enables you to modify them.
To access and modify the account settings:
.. image:: images/settings_account.png
:scale: 50 %
The fields and options in this window include:
* ``Connected to <ownCloud instance> as <user>`` field: Indicates the ownCloud server to which the client is synchronizing and the user account on that server.
* ``Add Folder...`` button: Provides the ability to add another folder to the synchronization process (see ``Adding a Folder``).
* ``Pause/Resume`` button: Pauses the current sync (or prevents the client from starting a new sync) or resumes the sync process.
* ``Remove`` button: Removes the selected folder from the sync process. This button is used when you want to synchronize only a few folders and not the root folder. If only the root folder is available, you must first remove the root from the synchronization and then add individual folders that you want to synchronize as desired.
* ``Storage Usage`` field: Indicates the storage utilization on the ownCloud server.
* ``Edit Ignored Files`` button: Launches the Ignored Files Editor.
* ``Modify Account`` button: Enables you to change the ownCloud server to which you are synchronizing. This option launches the ``Setting up an Account`` windows (See ??).
Adding a Folder
^^^^^^^^^^^^^^^
The ``Add a Folder ...`` button enables you to add a new folder to the syncrhonization process.
To add a new folder:
1. Click the ``Add a Folder ...`` button in the Account window.
The ``Add Folder...`` window opens
.. image:: images/folderwizard_local.png
:scale: 50 %
**``Add Folder...`` window (local folder)**
2. Specify a *unique* path and alias name to the folder or use the ``Choose...`` button to locate the new folder on your system to which you want to synchronize.
..note:: Nested synchronizations are not supported. In other words, you
cannot add a folder that is already contained within another synchronized
folder. In addition, you cannot add a higher level (parent) folder that
contains a folder to which you are already synchronizing. By default, the
ownCloud Set Up Wizard syncrhonizes your entire ownCloud account to the root
folder of the ownCloud server. Due to this default setup, you must first remove
the top-level folder prior to specifying new synchronizations.
3. Click 'Next' to continue.
A window opens prompting you to select a remote destination folder on the
ownCloud server to which you want to synchronize.
.. image:: images/folderwizard_remote.png
:scale: 50 %
**``Add Folder...`` window (remote destination)**
4. Select a folder on the ownCloud server to which you want to synchronize your newly added folder.
..note:: A server folder can only be synchronized with a particular client once.
If you attempt to sync the root directory, you cannot sync with other folders
on the server. Similarly, if you sync with folder ``/a``, you cannot create
another sync with ``/a/b``, since ``b`` is already being synched.
Editing Ignored Files
^^^^^^^^^^^^^^^^^^^^^
The :guilabel:`Ignored Files Editor` provides a list of preconfigured files
that are ignored (that is, not synchronized) by the client and server during
synchronizations. The Ignored Files Editor enables you to add patterns for
files or directories that you want to exclude from the synchronization process.
In addition to using standard characters, the Ignored Files Editor enables you
to use wild cards (for example, using an asterisk * to indicate multiple
characters or a question mark ? to incidate a single character).
For additional information about this editor, see `Using the Ignored Files Editor`_
Using the Activity Settings Window
----------------------------------
.. index:: activity, recent changes, sync activity
The Activity window provides an in-depth account of recent synchronization
activity. It shows files that have not been synchronized because they are on
the ignored files list or because they cannot be synced in a cross-platform
manner due to containing special characters that cannot be stored on certain
file systems.
.. image:: images/settings_activity.png
:scale: 50 %
**Activity settings window**
You can open the Activity window in one of the following ways:
- Click 'Activity' in the left frame of the ownCloud Settings window.
- Invoke the window from the ownCloud Desktop Client menu by selecting ``Recent
Changes`` > ``Details...``. (See Using the Desktop Client Menu.)
Using the General Settings Window
---------------------------------
.. index:: general settings, auto start, startup, desktop notifications
The General settings window enables you to set general settings for the
ownCloud Desktop Client and provides information about the software version,
its creator, and the existance of any updates.
.. image:: images/settings_general.png
:scale: 50 %
**General settings window**
The settings and information contained in this window are as follows:
* ``Launch on System Startup`` checkbox: Provides the option to check (enable)
or uncheck (disable) whether the ownCloud Desktop Client launches upon system
startup. By default, this option is enabled (checked)once you have configured
your account.
* ``Show Desktop Nofications`` checkbox: Provides the option to check (enable)
or uncheck (disable) bubble notifications alerting you as to when a set of
synchronization operations is performed.
* ``Use Monochrome Icons`` checkbox: Provides the option to check (enable) or
uncheck (disable) the use of monochrome (visually less obtrusive) icons.
.. note:: This option can be useful on MAC OSX platforms.
* ``About`` field: Provides information about the software authors along with
pertinent build conditions.
.. note:: Information in this field can be valuable when submitting a support request.
* ``Updates`` field: Provides information about any available updates for the
ownCloud Desktop Client.
Using the Network Settings Window
---------------------------------
.. index:: proxy settings, SOCKS, bandwith, throttling, limiting
The Network settings window enables you to define network proxy settings as
well as limit the download and upload bandwidth utilization of file
synchronizations.
.. image:: images/settings_network.png
:scale: 50 %
**Network settings window**
Specifying Proxy Settings
^^^^^^^^^^^^^^^^^^^^^^^^^
A proxy server is a server (for example, a computer system or an application)
that functions as an intermediary contact for requests from clients that are
seeking resources from other servers. For the ownCloud Desktop Client, you can
define the following proxy settings:
* ``No Proxy`` option: Specifies that the ownCloud Client circumvent the default proxy configured on the system.
* ``Use system proxy`` option: Default setting. Follows the systems proxy
settings. On Linux systems, this setting uses the value of the variable
``http_proxy``.
* ``Specify proxy manually as`` option: Enables you to specify
the following custom proxy settings:
- ``HTTP(S)``: Used when you are required to use an HTTP(S) proxy server (for example, Squid or Microsoft Forefront TMG).
- ``SOCKSv5``: Typically used in special company LAN setups, or in combination with the OpenSSH
dynamic application level forwarding feature (see ``ssh -D``).
- ``Host``: Host name or IP address of the proxy server along with the port number. HTTP proxies
typically listen over Ports 8080 (default) or 3128. SOCKS servers typically listen over port 1080.
* ``Proxy Server requires authentication`` checkbox: Provides the option to check (enable/require) or
uncheck (disable/not require) proxy server authentication. When not checked, the proxy server must
be configured to allow anonymous usage. When checked, a proxy server username and password is required.
Bandwidth Limiting
^^^^^^^^^^^^^^^^^^
Synchronization of files between a client and server can utilized a lot of
bandwidth. Bandwidth limiting can assist in shaping the total download or
upload bandwidth (or both) of your client/server connection to a more
manageable level. By limiting your bandwidth usage, you can maintain free
bandwidth for other applications to use.
The ownCloud Desktop Client enables you to limit (throttle) the bandwidth usage
for both file downloads and file uploads. The Download Bandwidth field (for
data flowing from the ownCloud server to the client) provides the following
options:
- ``No limit`` option: The default setting for the client; specifies that there
are no limit settings on the amount of data downloaded from the server.
- ``Limit to <value> KBytes/s`` option: Limits (throttles) the bandwidth to
a customized value (in KBytes/second).
The Upload Bandwidth field (for data flowing from the ownCloud client to the
server) provides the following options:
- ``No limit`` option: The default setting for the client; specifies that there
are no limit settings on the amount of data downloaded from the server.
- ``Limit automatically``: When enabled, the ownCloud client surrenders
available bandwidth to other applications. Use this option if there are
issues with real time communication (for example, the use of IP phone or live
streaming) in conjunction with the ownCloud Client.
- ``Limit to <value> KBytes/s`` option: Limits (throttles) the bandwidth to a
customized value (in KBytes/second).
.. _ignoredFilesEditor-label:
Using the Ignored Files Editor
------------------------------
.. index:: ignored files, exclude files, pattern
You might have some files or directories that you do not want to backup and
store on the server. To identify and exclude these files or directories, you
can use the *Ignored Files Editor* that is embedded in the ownCloud Desktop
Client.
.. image:: images/ignored_files_editor.png
:scale: 50%
Ignored Files Editor window
The :guilabel:`Ignored Files Editor` enables you to define customized patterns that the
ownCloud Client uses to identify files and directories that you want to exclude
from the synchronization process. For your convenience, the editor is
pre-populated with a default list of typically ignore patterns. These patterns
are contained in a system file (typically ``sync-exclude.lst``) located in the
ownCloud Client application directory. You cannot modify these pre-populated
patterns directly from the editor. However, if necessary, you can hover over
any pattern in the list to show the path and filename associated with that
pattern, locate the file, and edit the ``sync-exclude.lst`` file.
.. note:: Modifying the global exclude definition file might render the client
unusable or result in undesired behavior.
Each line in the editor contains an ignore pattern string. When creating custom
patterns, in addition to being able to use normal characters to define an
ignore pattern, you can use wildcards characters for matching values. As an
example, you can use an asterisk (``*``) to idenfify an arbitrary number of
characters or a question mark (``?``) to identify a single character.
Patterns that end with a slash character (``/``) are applied to only directory
components of the path being checked.
.. note:: Custom entries are currently not validated for syntactical
correctness by the editor, but might fail to load correctly.
Each pattern string in the list is preceded by a checkbox. When the check box
contains a check mark, in addition to ignoring the file or directory component
matched by the pattern, any matched files are also deemed "fleeting metadata"
and removed by the client.
In addition to excluding files and directories that use patterns defined in
this list:
- The ownCloud Client always excludes files containing characters that cannot
be synchronized to other file systems.
- As of ownCloud Desktop Client version 1.5.0, files are removed that cause
individual errors three times during a synchronization. However, the client
provides the option of retrying a synchronization three additional times on
files that produce errors.
For more detailed information see :ref:`ignored-files-label`.
+8 -7
Ver Arquivo
@@ -1,23 +1,24 @@
When invoking the client from the command line, the following options are supported:
``-h``, ``--help``
Displays all the options below or, when used on Windows, opens a window displaying all options.
shows all the below options (opens a window on Windows)
``--logwindow``
Opens a window displaying log output.
open a window to show log output.
``--logfile`` `<filename>`
Write log output to the file specified. To write to stdout, specify `-` as the filename.
write log output to file <filename>. To write to stdout, specify `-`
as filename
``--logdir`` `<name>`
Writes each synchronization log output in a new file in the specified directory.
write each sync log output in a new file in directory <name>
``--logexpire`` `<hours>`
Removes logs older than the value specified (in hours). This command is used with ``--logdir``.
removes logs older than <hours> hours. (to be used with --logdir)
``--logflush``
Clears (flushes) the log file after each write action.
flush the log file after every write.
``--confdir`` `<dirname>`
Uses the specified configuration directory.
Use the given configuration directory.
+6 -2
Ver Arquivo
@@ -10,9 +10,13 @@ SYNOPSIS
DESCRIPTION
===========
The ownCloud Client is a file synchronization desktop utility based on mirall. It synchronizes files on your local computer, tablet, or handheld device with an ownCloud Server. If you make a change to the files on one device, the change is propagated to all other syncrhonized devices using the desktop synchronization clients.
ownCloud is a file synchronisation desktop utility based on mirall.
It synchronizes files on your local machine with an ownCloud Server. If you
make a change to the files on one computer, it will flow across the others
using this desktop sync clients.
Normally, you start the client by clicking on the desktop icon or by starting it from the client application menu. After starting, an ownCloud icon appears in the computer system tray or on your tablet or handheld device.
Normally you start the client by click on the desktop icon or start from the
application menu. After starting an ownCloud icon appears in the system tray.
Options
=======
+14 -14
Ver Arquivo
@@ -9,38 +9,38 @@ SYNOPSIS
DESCRIPTION
===========
owncloudcmd is the command line tool used for the ownCloud file synchronization
desktop utility. This command line tool is based on mirall.
owncloudcmd is the command line tool for the ownCloud file synchronisation
desktop utility, based on mirall.
Contrary to the :manpage:`owncloud(1)` GUI client, `owncloudcmd` only performs
a single sync run and then exits. In so doing, `owncloudcmd` replaces the
`ocsync` binary used for the same purpose in earlier releases.
Contrary to the :manpage:`owncloud(1)` GUI client, `owncloudcmd` will only
perform a single sync run and then exit. It thus replaces the `ocsync` binary
used for the same purpose in earlier releases.
A *sync run* synchronizes a single local directory using a WebDAV share on a
A sync run will sync a single local directory with a WebDAV share on a
remote ownCloud server.
To invoke the command line client, provide the local and the remote repository:
The first parameter is the local directory. The second parameter is
the server URL.
.. note:: Prior to the 1.6 release of owncloudcmd, the tool only accepted
``owncloud://`` or ``ownclouds://`` in place of ``http://`` and ``https://`` as
a scheme. See ``Examples`` for details.
.. note:: Prior to 1.6, the tool only accepted ``owncloud://`` or ``ownclouds://``
in place of ``http://`` and ``https://`` as a scheme. See ``Examples``
for details.
OPTIONS
=======
``--confdir`` `PATH`
Specifies the configuration directory where `csync.conf` is located.
The configuration dir where `csync.conf` is located
``--silent``
Inhibits verbose log output.
Don't give verbose log output
``--httpproxy http://[user@pass:]<server>:<port>``
Uses ``server`` as HTTP proxy.
Use ``server`` as HTTP proxy
Example
=======
To synchronize the ownCloud directory ``Music`` to the local directory ``media/music``
To sync the ownCloud directory ``Music`` to the local directory ``media/music``
through a proxy listening on port ``8080`` on the gateway machine ``192.168.178.1``,
the command line would be::
@@ -49,7 +49,7 @@ the command line would be::
https://server/owncloud/remote.php/webdav/Music
Using the legacy scheme, it would be::
Using the legacy scheme, it would look like this::
$ owncloudcmd --httpproxy http://192.168.178.1:8080 \
$HOME/media/music \
+29 -28
Ver Arquivo
@@ -1,43 +1,44 @@
The ownCloud Client packages contain a command line client that can be used to
synchronize ownCloud files to client machines. The command line client is
called ``owncloudcmd``.
The ownCloud Client packages come with a command line client which
can be used to synchronize ownCloud files to client machines. The
command line client is called ``owncloudcmd``.
owncloudcmd performs a single *sync run* and then exits the synchronization
process. In this manner, owncloudcmd processes the differences between client
and server directories and propagates the files to bring both repositories to
the same state. Contrary to the GUI-based client, owncloudcmd does not repeat
synchronizations on its own. It also does not monitor for file system changes.
owncloudcmd performs a single sync run and then exits.
That means that it processes the differences between client- and
server directory and propagates the files to get both repositories
on the same status. Contrary to the GUI based client, it does not
repeat syncs on its own. It does also not monitor for file system
changes.
To invoke the owncloudcmd, you must provide the local and the remote repository
urls using the following command::
To invoke the command line client, the user has to provide the local
and the remote repository urls::
owncloudcmd [OPTIONS...] sourcedir owncloudurl
where ``sourcedir`` is the local directory and ``owncloudurl`` is
the server URL.
the server url.
.. note:: Prior to the 1.6 version of owncloudcmd, the tool only accepted
``owncloud://`` or ``ownclouds://`` in place of ``http://`` and ``https://`` as
a scheme. See ``Examples`` for details.
.. note:: Prior to 1.6, the tool only accepted ``owncloud://`` or
``ownclouds://`` in place of ``http://`` and ``https://``
as a scheme. See ``Examples`` for details.
Other comand line switches supported by owncloudcmd include the following:
These are other comand line switches supported by owncloudcmd:
- ``--silent``
Supresses verbose log output.
``--silent``
Don't give verbose log output
- ``--confdir`` `PATH`
Fetches or stores configuration in the specified configuration directory.
``--confdir`` `PATH`
Fetch or store configuration in this custom config directory
- ``--httpproxy http://[user@pass:]<server>:<port>``
Uses the specified ``server`` as the HTTP proxy.
``--httpproxy http://[user@pass:]<server>:<port>``
Use ``server`` as HTTP proxy
Credential Handling
~~~~~~~~~~~~~~~~~~~
By default, owncloudcmd reads the client configuration and uses the credentials
of the GUI syncrhonization client. If no client is configured, or if you choose
to use a different user to synchronize, you can specify the user password
setting with the usual URL pattern. For example::
of the GUI sync client. If no client was configured or to use a different user
to sync, the user password setting can be specified with the usual URL pattern,
for example::
https://user:secret@192.168.178.2/remote.php/webdav
@@ -45,16 +46,16 @@ setting with the usual URL pattern. For example::
Example
~~~~~~~
To synchronize the ownCloud directory ``Music`` to the local directory
``media/music`, through a proxy listening on port ``8080``, and on a gateway
machine using IP address ``192.168.178.1``, the command line would be::
To sync the ownCloud directory ``Music`` to the local directory ``media/music``
through a proxy listening on port ``8080`` on the gateway machine ``192.168.178.1``,
the command line would be::
$ owncloudcmd --httpproxy http://192.168.178.1:8080 \
$HOME/media/music \
https://server/owncloud/remote.php/webdav/Music
Using the legacy scheme, the command line would be::
Using the legacy scheme, it would look like this::
$ owncloudcmd --httpproxy http://192.168.178.1:8080 \
$HOME/media/music \
+100 -165
Ver Arquivo
@@ -1,223 +1,158 @@
Appendix C: Troubleshooting
===========================
The following two general issues can result in failed synchronization:
If the client fails to start syncing it basically can have two
basic reasons: Either the server setup has a problem or the client
has a bug. When reporting bugs, it is crucial to find out what part
of the system causes the problem.
- The server setup is incorrect.
- The client contains a bug.
When reporting bugs, it is helpful if you first determine what part of the
system is causing the issue.
Identifying Basic Functionality Problems
Identifying basic functionality problems
----------------------------------------
:Performing a general ownCloud Server test:
The first step in troubleshooting synchronization issues is to verify that
you can log on to the ownCloud web application. To verify connectivity to the
ownCloud server:
- Open a browser window and enter the server address to your own server in the location/address bar.
For example, if your ownCloud instance is installed at URL address
``http://yourserver.com/owncloud``, enter ``http://yourserver.com/owncloud/``
into your browsers location/address bar.
:Perform a general ownCloud Server test:
A very first check is to verify that you can log on to ownClouds web
application. Assuming your ownCloud instance is installed at
``http://yourserver.com/owncloud``, type
``http://yourserver.com/owncloud/`` into your browsers address bar.
If you are not prompted for your username and password, or if a red warning
box appears on the page, your server setup requires modification. Please verify
that your server installation is working correctly.
If you are not prompted to enter your user name and password, or if you
see a red warning box on the page, your server setup is not correct or needs
fixes. Please verify that your server installation is working correctly.
:Ensure the WebDAV API is working:
If all desktop clients fail to connect to the ownCloud Server, but access
using the web interface functions properly, the problem is often a
misconfiguration of the WebDAV API.
If all desktop clients fail to connect to ownCloud, but the access via the
web interface works, the problem often is a mis-configuration of the WebDAV
API.
The ownCloud Client uses the built-in WebDAV access of the server content.
Verify that you can log on to ownClouds WebDAV server. To verify connectivity
with the ownCloud WebDAV server:
The ownCloud client uses the built-in WebDAV access of the server content.
Verify that you can log on to ownClouds WebDAV server. Assuming your ownCloud
instance is installed at ``http://yourserver.com/owncloud``, type
``http://yourserver.com/owncloud/remote.php/webdav`` into your browsers
address bar.
- Open a browser window and enter the address to the ownCloud WebDAV server.
For example, if your ownCloud instance is installed at
``http://yourserver.com/owncloud``, your WebDAV server address is
``http://yourserver.com/owncloud/remote.php/webdav``.
If you are prompted for your username and password but, after providing the
correct credentials, authentication fails, please ensure that your
authentication backend is configured properly.
If you are prompted, but the authentication fails even though the credentials
your provided are correct, please ensure that your authentication backend
is configured properly.
:Use a WebDAV command line tool to test:
A more sophisticated test method for troubleshooting syncrhonization issues
is to use a WebDAV command line client and log into the ownCloud WebDAV server.
One such command line client -- called cadaver -- is available for Linux
distributions. You can use this application to further verify that the WebDAV
server is running properly using PROPFIND calls.
As an example, after installing the cadaver app, you can issue the
``propget`` command to obtain various properties pertaining to the current
directory and also verify WebDAV server connection.
A more sophisticated test is to use a WebDAV command line client and log
into the ownCloud WebDAV server, such as a little app called cadaver,
available on Linux. It can be used to further verify that the WebDAV server is
running properly, for example by performing PROPFIND calls:
``propget .`` called within cadaver will return some properties of the current
directory and thus be a successful WebDAV connect.
Isolating other issues
----------------------
Other issues can affect synchronization of your ownCloud files:
If the sync result is unreliable, please ensure that the folder synced with
ownCloud is not shared with other syncing apps.
- If you find that the results of the synchronizations are unreliable, please
ensure that the folder to which you are synchronizing is not shared with
other synchronization applications.
.. note:: Syncing the same directory with ownCloud and other sync software such
as Unison, rsync, Microsoft Windows Offline Folders or cloud services
such as DropBox or Microsoft SkyDrive is not supported and should
not be attempted. In the worst case, doing so can result in data
loss.
.. note:: Synchronizing the same directory with ownCloud and other
synchronization software such as Unison, rsync, Microsoft Windows Offline
Folders, or other cloud services such as DropBox or Microsoft SkyDrive is not
supported and should not be attempted. In the worst case, it is possible that
synchronizing folders or files using ownCloud and other synchronization
software or services can result in data loss.
If some files do not get take a look at the sync protocol. Some files are
automatically automatically being ignored because they are system files,
others get ignored because their file name contains characters that cannot
be represented on certain file systems. See :ref:`_ignored-files-label` for
details.
- If you find that only specific files are not synrchronized, the
synchronization protocol might be having an effect. Some files are
automatically ignored because they are system files, other files might be
ignored because their filename contains characters that are not supported on
certain file systems. For more information about ignored files, see
:ref:`_ignored-files-label`.
If you are operating your own server and use the local storage backend (the
default), make sure that ownCloud has exclusive access to the directory.
- If you are operating your own server, and use the local storage backend (the
default), make sure that ownCloud has exclusive access to the directory.
.. note:: The data directory on the server is exclusive to ownCloud and must
not be modified manually.
.. note:: The data directory on the server is exclusive to ownCloud and must not be modified manually.
If you are using a different backend, you can try to exclude a bug in the
backend by reverting to the local backend.
If you are using a different file backend on the server, you can try to exclude a bug in the
backend by reverting to the built-in backend.
Logfiles
--------
Log Files
---------
Doing effective debugging requires to provide as much as relevant logs as
possible. The log output can help you with tracking down problem, and if you
report a bug, you're advised to include the output.
Effectively debugging software requires as much relative information as can be
obtained. To assist the ownCloud support personnel, please try to provide as
many relevant logs as possible. Log output can help with tracking down
problems and, if you report a bug, log output can help to resolve an issue more
quickly.
Client Logfile
~~~~~~~~~~~~~~
Obtaining the Client Log File
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Start the client with ``--logwindow``. That opens a window providing a view
on the current log. It provides a Save button to let you save the log to a
file.
To obtain the client log file:
1. Open the ownCloud Desktop Client.
2. Press F12 on your keyboard.
The Log Output window opens.
.. image:: images/log_output_window.png
3. Click the 'Save' button.
The Save Log File window opens.
.. image:: images/save_log_file.png
4. Migrate to a location on your system where you want to save your log file.
5. Name the log file and click the 'Save' button.
The log files is saved in the location specifed.
Alternatively, you can launch the ownCloud Log Output window using the
``--logwindow`` command. After issuing this command, the Log Output window
opens to show the current log. You can then follow the same procedures
mentioned above to save the log to a file.
.. note:: You can also open a log window for an already running session, by
restarting the client using the following command:
You can also open a log window for an already running session, by simply
starting the client again with this parameter. Syntax:
* Windows: ``C:\Program Files (x86)\ownCloud\owncloud.exe --logwindow``
* Mac OS X: ``/Applications/owncloud.app/Contents/MacOS/owncloud --logwindow``
* Linux: ``owncloud --logwindow``
Saving Files Directly
~~~~~~~~~~~~~~~~~~~~~
It is also possible to directly log to a directory, which is an useful option
in case the problem only happens ocassionally. In that case it is better to
create a huge amount of data, as the log window has a limited buffer.
The ownCloud client enables you to save log files directly to a predefined file
or directory. This is a useful option for troubleshooting sporadic issues as
it enables you to log large amounts of data and bypasses the limited buffer
settings associated with the log window.
To write logs to disk, start the client with ``--logfile <file>``, where
``<file`` is the file you want to log to, or ``--logdir <dir>``, where ``<dir>``
is an existing directory. In case of ``--logdir``, each sync run will create a
new file. To limit the amount of data that accumulates over time, there is another
useful parameter: ``--logexpire <hours>```. If that is combined with ```--logdir```
the client automatically erases log data in that directory that is older than the
given expiry period.
To save log files to a file or a directory:
1. To save to a file, start the client using the ``--logfile <file>`` command,
where ``<file>`` is the filename to which you want to save the file.
2. To save to a directory, start the client using the ``--logdir <dir>`` command, where ``<dir>``
is an existing directory.
When using the ``--logdir`` command, each sync run creates a new file. To limit
the amount of data that accumulates over time, you can specify the
``--logexpire <hours>`` command. When combined with the ``--logdir`` command,
the client automatically erases saved log data in the directory that is older
than the specified number of hours.
As an example, to define a test where you keep log data for two days, you can
issue the following command:
For example, for a long running test where you intend to keep the log data of the
last two days, this would be the command line:
```
owncloud --logdir /tmp/owncloud_logs --logexpire 48
```
ownCloud server Log File
~~~~~~~~~~~~~~~~~~~~~~~~
ownCloud server Logfile
~~~~~~~~~~~~~~~~~~~~~~~
The ownCloud server also maintains an ownCloud specific log file. This log file
must be enabled through the ownCloud Administration page. On that page, you can
adjust the log level. We recommend that when setting the log file level that
you set it to a verbose level like ``Debug`` or ``Info``.
The ownCloud server maintains an ownCloud specific logfile as well. It can and
must be enabled through the ownCloud Administration page. There you can adjust
the loglevel. It is advisable to set it to a verbose level like ``Debug`` or
``Info``.
You can view the server log file using the web interface or you can open it
directly from the file system in the ownCloud server data directory.
The logfile can be viewed either in the web interface or can be found in the
filesystem in the ownCloud server data dir.
.. todo:: Need more information on this. How is the log file accessed?
Need to explore procedural steps in access and in saving this file ... similar
to how the log file is managed for the client. Perhaps it is detailed in the
Admin Guide and a link should be provided from here. I will look into that
when I begin heavily editing the Admin Guide.
Webserver Logfiles
~~~~~~~~~~~~~~~~~~
Webserver Log Files
~~~~~~~~~~~~~~~~~~~
It can be helpful to view your webservers error log file to isolate any
ownCloud-related problems. For Apache on Linux, the error logs are typically
located in the ``/var/log/apache2`` directory. Some helpful files include the
following:
- ``error_log`` -- Maintains errors associated with PHP code.
- ``access_log`` -- Typically records all requests handled by the server; very
useful as a debugging tool because the log line contains information specific
to each request and its result.
Also, please take a look at your webservers error log file to check if there
are problems. For Apache on Linux, the error logs usually can be found at
``/var/log/apache2``. A file called ``error_log`` shows errors like PHP code
problems. A file called ``access_log`` usually records all requests handled
by the server. Especially the access_log is a very good debugging tool as the
log line contains a lot of information of every request and it's result.
You can find more information about Apache logging at
More information about the apache logging can be found at
``http://httpd.apache.org/docs/current/logs.html``.
Core Dumps
----------
On MAC OS X and Linux systems, and in the unlikely event the client software
crashes, the client is able to write a core dump file. Obtaining a core dump
file can assist ownCloud Customer Support tremendously in the debugging
process.
In case of crashes of the client software, having a core dump helps to
debug the issue tremendously.
To enable the writing of core dump files, you must define the
``OWNCLOUD_CORE_DUMP`` environment variable on the system.
The client is able to write a core dump in case of crashing on Linux and
MacOSX. To enable that, the environment variable ``OWNCLOUD_CORE_DUMP`` has
to be defined.
For example:
For example
```
OWNCLOUD_CORE_DUMP=1 owncloud
```
This command starts the client with core dumping enabled and saves the files in
the current working directory.
starts the client with core dumping enabled. Core dumps appear in the
current working directory, and since they can be fairly large, it is
important to have plenty of disk space when running with dumps enabled.
.. note:: Core dump files can be fairly large. Before enabling core dumps on
your system, ensure that you have enough disk space to accommodate these files.
Also, due to their size, we strongly recommend that you properly compress any
core dump files prior to sending them to ownCloud Customer Support.
If a core dump file should be transfered back to the developers it
should be compressed properly before.
Arquivo binário não exibido.
+83
Ver Arquivo
@@ -0,0 +1,83 @@
import os
import urllib
import socket
from gi.repository import GObject, Nautilus
class ownCloudExtension(GObject.GObject, Nautilus.ColumnProvider, Nautilus.InfoProvider):
nautilusVFSFile_table = {}
def __init__(self):
self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
self.sock.connect("/home/kf/.local/share/data/ownCloud/socket")
self.sock.settimeout(15)
GObject.io_add_watch(self.sock, GObject.IO_IN, self.handle_notify)
def sendCommand(self, cmd):
self.sock.send(cmd)
def find_item_for_file( self, path ):
return self.nautilusVFSFile_table[path]
def callback_update_file( self, path ):
print "Got an update callback for " + path
def askForOverlay(self, file):
if os.path.isdir(file):
folderStatus = self.sendCommand("RETRIEVE_FOLDER_STATUS:"+file+"\n");
if os.path.isfile(file):
fileStatus = self.sendCommand("RETRIEVE_FILE_STATUS:"+file+"\n");
# Handles a single line of server respoonse and sets the emblem
def handle_server_response(self, l):
Emblems = { 'NOP': '',
'NEED_SYNC':'view-refresh',
'OK': 'dialog-ok' }
parts = l.split(':')
if len(parts) > 2:
if parts[0] == 'STATUS':
emblem = Emblems[parts[1]]
elif parts[0] == 'BROADCAST':
emblem = Emblems[parts[1]]
else:
print "We got unknown status " + parts[0]
if emblem:
item = self.nautilusVFSFile_table[parts[2]]
if item:
item.set_emblem(emblem)
# notify is the raw answer from the socket
def handle_notify(self, source, condition):
print "T "
data = source.recv(1024)
if len(data) > 0:
for l in data.split('\n'):
self.handle_server_response( l )
return True # run again
def get_local_path(self, path):
return path.replace("file://", "")
def get_columns(self):
return Nautilus.Column(name="NautilusPython::share_state_column",
attribute="share_state",
label="Share State",
description="The ownCloud Share State"),
def update_file_info(self, item):
if item.get_uri_scheme() != 'file':
return
filename = urllib.unquote(item.get_uri()[7:])
self.nautilusVFSFile_table[filename] = item
print "XXX " + filename
item.add_string_attribute('share_state', "share state")
self.askForOverlay(filename)
+1 -1
Ver Arquivo
@@ -317,7 +317,7 @@ void FancyLineEdit::setButtonFocusPolicy(Side side, Qt::FocusPolicy policy)
// IconButton - helper class to represent a clickable icon
IconButton::IconButton(QWidget *parent)
: QAbstractButton(parent), m_iconOpacity(0), m_autoHide(false)
: QAbstractButton(parent), m_autoHide(false)
{
setCursor(Qt::ArrowCursor);
setFocusPolicy(Qt::NoFocus);
-3
Ver Arquivo
@@ -86,7 +86,6 @@ set(libsync_SRCS
mirall/mirallconfigfile.cpp
mirall/syncengine.cpp
mirall/owncloudpropagator.cpp
mirall/bandwidthmanager.cpp
mirall/propagatorjobs.cpp
mirall/propagator_qnam.cpp
mirall/propagator_legacy.cpp
@@ -356,9 +355,7 @@ ENDIF()
include_directories(../csync/src ../csync/src/httpbf/src ${CMAKE_CURRENT_BINARY_DIR}/../csync ${CMAKE_CURRENT_BINARY_DIR}/../csync/src )
include_directories(${3rdparty_INC})
if(NOT TOKEN_AUTH_ONLY)
qt_add_translation(mirall_I18N ${TRANSLATIONS})
endif()
set( final_src
${mirall_HEADERS}
+16 -41
Ver Arquivo
@@ -48,9 +48,8 @@ int getauth(const char *prompt,
void *userdata)
{
int re = 0;
// ### safe? Not really. If the wizard is run in the main thread, the caccount could change during the sync.
// Ideally, http_credentials could be use userdata, but userdata is the SyncEngine.
QMutex mutex;
// ### safe?
HttpCredentials* http_credentials = qobject_cast<HttpCredentials*>(AccountManager::instance()->account()->credentials());
if (!http_credentials) {
@@ -64,8 +63,10 @@ int getauth(const char *prompt,
if( qPrompt == QLatin1String("Enter your username:") ) {
// qDebug() << "OOO Username requested!";
QMutexLocker locker( &mutex );
qstrncpy( buf, user.toUtf8().constData(), len );
} else if( qPrompt == QLatin1String("Enter your password:") ) {
QMutexLocker locker( &mutex );
// qDebug() << "OOO Password requested!";
qstrncpy( buf, pwd.toUtf8().constData(), len );
} else {
@@ -100,8 +101,7 @@ HttpCredentials::HttpCredentials()
: _user(),
_password(),
_ready(false),
_fetchJobInProgress(false),
_readPwdFromDeprecatedPlace(false)
_fetchJobInProgress(false)
{
}
@@ -230,7 +230,6 @@ void HttpCredentials::fetch(Account *account)
job->setProperty("account", QVariant::fromValue(account));
job->start();
_fetchJobInProgress = true;
_readPwdFromDeprecatedPlace = true;
}
}
bool HttpCredentials::stillValid(QNetworkReply *reply)
@@ -262,40 +261,18 @@ void HttpCredentials::slotReadJobDone(QKeychain::Job *job)
_ready = true;
emit fetched();
} else {
// we come here if the password is empty or any other keychain
// error happend.
// In all error conditions it should
// ask the user for the password interactively now.
if( _readPwdFromDeprecatedPlace ) {
// there simply was not a password. Lets restart a read job without
// a settings object as we did it in older client releases.
ReadPasswordJob *job = new ReadPasswordJob(Theme::instance()->appName());
const QString kck = keychainKey(account->url().toString(), _user);
job->setKey(kck);
connect(job, SIGNAL(finished(QKeychain::Job*)), SLOT(slotReadJobDone(QKeychain::Job*)));
job->setProperty("account", QVariant::fromValue(account));
job->start();
_readPwdFromDeprecatedPlace = false; // do try that only once.
_fetchJobInProgress = true;
// Note: if this read job succeeds, the value from the old place is still
// NOT persisted into the new account.
} else {
// interactive password dialog starts here
bool ok;
QString pwd = queryPassword(&ok);
_fetchJobInProgress = false;
if (ok) {
_password = pwd;
_ready = true;
persist(account);
} else {
_password = QString::null;
_ready = false;
}
emit fetched();
if( error != NoError ) {
qDebug() << "Error while reading password" << job->errorString();
}
bool ok;
QString pwd = queryPassword(&ok);
_fetchJobInProgress = false;
if (ok) {
_password = pwd;
_ready = true;
persist(account);
}
emit fetched();
}
}
@@ -365,8 +342,6 @@ void HttpCredentials::slotWriteJobDone(QKeychain::Job *job)
default:
qDebug() << "Error while writing password" << job->errorString();
}
WritePasswordJob *wjob = qobject_cast<WritePasswordJob*>(job);
wjob->deleteLater();
}
void HttpCredentials::slotAuthentication(QNetworkReply* reply, QAuthenticator* authenticator)
-1
Ver Arquivo
@@ -63,7 +63,6 @@ private:
QString _password;
bool _ready;
bool _fetchJobInProgress; //True if the keychain job is in progress or the input dialog visible
bool _readPwdFromDeprecatedPlace;
};
} // ns Mirall
+3 -1
Ver Arquivo
@@ -26,13 +26,15 @@ class ShibbolethUserJob : public AbstractNetworkJob {
Q_OBJECT
public:
explicit ShibbolethUserJob(Account *account, QObject* parent = 0);
public slots:
void start();
signals:
// is always emitted when the job is finished. user is empty in case of error.
void userFetched(const QString &user);
// Another job need to be created
void tryAgain();
private slots:
virtual bool finished();
};
+22 -12
Ver Arquivo
@@ -18,8 +18,10 @@
#include <QWebFrame>
#include <QWebPage>
#include <QMessageBox>
#include <QAuthenticator>
#include <QNetworkReply>
#include "creds/shibboleth/authenticationdialog.h"
#include "creds/shibboleth/shibbolethwebview.h"
#include "creds/shibbolethcredentials.h"
#include "mirall/account.h"
@@ -34,7 +36,6 @@ ShibbolethWebView::ShibbolethWebView(Account* account, QWidget* parent)
: QWebView(parent)
, _account(account)
, _accepted(false)
, _cursorOverriden(false)
{
// no minimize
setWindowFlags(Qt::Dialog);
@@ -64,6 +65,7 @@ ShibbolethWebView::ShibbolethWebView(Account* account, QWidget* parent)
ShibbolethWebView::~ShibbolethWebView()
{
slotLoadFinished();
}
void ShibbolethWebView::onNewCookiesForUrl (const QList<QNetworkCookie>& cookieList, const QUrl& url)
@@ -80,10 +82,6 @@ void ShibbolethWebView::onNewCookiesForUrl (const QList<QNetworkCookie>& cookieL
void ShibbolethWebView::closeEvent(QCloseEvent *event)
{
if (_cursorOverriden) {
QApplication::restoreOverrideCursor();
}
if (!_accepted) {
Q_EMIT rejected();
}
@@ -92,17 +90,12 @@ void ShibbolethWebView::closeEvent(QCloseEvent *event)
void ShibbolethWebView::slotLoadStarted()
{
if (!_cursorOverriden) {
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
_cursorOverriden = true;
}
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
}
void ShibbolethWebView::slotLoadFinished(bool success)
{
if (_cursorOverriden) {
QApplication::restoreOverrideCursor();
}
QApplication::restoreOverrideCursor();
if (!title().isNull()) {
setWindowTitle(tr("%1 - %2").arg(Theme::instance()->appNameGUI(), title()));
@@ -114,6 +107,23 @@ void ShibbolethWebView::slotLoadFinished(bool success)
}
}
void ShibbolethWebView::slotHandleAuthentication(QNetworkReply *reply, QAuthenticator *authenticator)
{
Q_UNUSED(reply)
QUrl url = reply->url();
// show only scheme, host and port
QUrl reducedUrl;
reducedUrl.setScheme(url.scheme());
reducedUrl.setHost(url.host());
reducedUrl.setPort(url.port());
AuthenticationDialog dialog(authenticator->realm(), reducedUrl.toString(), this);
if (dialog.exec() == QDialog::Accepted) {
authenticator->setUser(dialog.user());
authenticator->setPassword(dialog.password());
}
}
void ShibbolethWebView::accept()
{
_accepted = true;
+2 -2
Ver Arquivo
@@ -46,7 +46,8 @@ Q_SIGNALS:
private Q_SLOTS:
void onNewCookiesForUrl(const QList<QNetworkCookie>& cookieList, const QUrl& url);
void slotLoadStarted();
void slotLoadFinished(bool success);
void slotLoadFinished(bool success = true);
void slotHandleAuthentication(QNetworkReply*,QAuthenticator*);
protected:
void accept();
@@ -55,7 +56,6 @@ private:
void setup(Account *account, ShibbolethCookieJar* jar);
QPointer<Account> _account;
bool _accepted;
bool _cursorOverriden;
};
} // ns Mirall
+1 -46
Ver Arquivo
@@ -16,11 +16,9 @@
#include <QSettings>
#include <QNetworkReply>
#include <QMessageBox>
#include <QAuthenticator>
#include <QDebug>
#include "creds/shibbolethcredentials.h"
#include "creds/shibboleth/authenticationdialog.h"
#include "creds/shibboleth/shibbolethwebview.h"
#include "creds/shibboleth/shibbolethrefresher.h"
#include "creds/shibbolethcredentials.h"
@@ -94,23 +92,6 @@ ShibbolethCredentials::ShibbolethCredentials()
_browser(0)
{}
ShibbolethCredentials::ShibbolethCredentials(const QNetworkCookie& cookie, Account* account)
: _ready(true),
_stillValid(true),
_fetchJobInProgress(false),
_browser(0),
_shibCookie(cookie)
{
if (account) {
/* The _user has not yet been fetched, so fetch it now */
ShibbolethUserJob *job = new ShibbolethUserJob(account, this);
connect(job, SIGNAL(userFetched(QString)), this, SLOT(slotUserFetched(QString)));
QTimer::singleShot(1234, job, SLOT(start()));
}
}
void ShibbolethCredentials::syncContextPreInit(CSYNC* ctx)
{
csync_set_auth_callback (ctx, handleNeonSSLProblems);
@@ -173,8 +154,6 @@ QNetworkAccessManager* ShibbolethCredentials::getQNAM() const
QNetworkAccessManager* qnam(new MirallAccessManager);
connect(qnam, SIGNAL(finished(QNetworkReply*)),
this, SLOT(slotReplyFinished(QNetworkReply*)));
connect(qnam, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)),
SLOT(slotHandleAuthentication(QNetworkReply*,QAuthenticator*)));
return qnam;
}
@@ -319,23 +298,6 @@ void ShibbolethCredentials::invalidateAndFetch(Account* account)
job->start();
}
void ShibbolethCredentials::slotHandleAuthentication(QNetworkReply *reply, QAuthenticator *authenticator)
{
Q_UNUSED(reply)
QUrl url = reply->url();
// show only scheme, host and port
QUrl reducedUrl;
reducedUrl.setScheme(url.scheme());
reducedUrl.setHost(url.host());
reducedUrl.setPort(url.port());
AuthenticationDialog dialog(authenticator->realm(), reducedUrl.toString());
if (dialog.exec() == QDialog::Accepted) {
authenticator->setUser(dialog.user());
authenticator->setPassword(dialog.password());
}
}
void ShibbolethCredentials::slotInvalidateAndFetchInvalidateDone(QKeychain::Job* job)
{
Account *account = qvariant_cast<Account*>(job->property("account"));
@@ -388,16 +350,9 @@ void ShibbolethCredentials::showLoginWindow(Account* account)
// FIXME On OS X this does not raise properly
return;
}
CookieJar *jar = static_cast<CookieJar*>(account->networkAccessManager()->cookieJar());
// When opening a new window clear all the session cookie that might keep the user from logging in
// (or the session may already be open in the server, and there will not be redirect asking for the
// real long term cookie we want to store)
jar->clearSessionCookies();
_browser = new ShibbolethWebView(account);
connect(_browser, SIGNAL(shibbolethCookieReceived(QNetworkCookie, Account*)),
this, SLOT(onShibbolethCookieReceived(QNetworkCookie, Account*)), Qt::QueuedConnection);
this, SLOT(onShibbolethCookieReceived(QNetworkCookie, Account*)));
connect(_browser, SIGNAL(rejected()), this, SLOT(slotBrowserRejected()));
_browser->show();
-6
Ver Arquivo
@@ -26,8 +26,6 @@ namespace QKeychain {
class Job;
}
class QAuthenticator;
namespace Mirall
{
@@ -40,9 +38,6 @@ Q_OBJECT
public:
ShibbolethCredentials();
/* create a credidentials for an already connected account */
ShibbolethCredentials(const QNetworkCookie &cookie, Account *acc);
void syncContextPreInit(CSYNC* ctx);
void syncContextPreStart(CSYNC* ctx);
bool changed(AbstractCredentials* credentials) const;
@@ -63,7 +58,6 @@ public:
public Q_SLOTS:
void invalidateAndFetch(Account *account);
void slotHandleAuthentication(QNetworkReply*,QAuthenticator*);
private Q_SLOTS:
void onShibbolethCookieReceived(const QNetworkCookie&, Account*);
+25 -17
Ver Arquivo
@@ -17,7 +17,6 @@
#include <QDebug>
#include <QNetworkReply>
#include <QSettings>
#include <QNetworkCookieJar>
#include "mirall/account.h"
#include "mirall/mirallaccessmanager.h"
@@ -80,18 +79,15 @@ public:
: MirallAccessManager(parent), _cred(cred) {}
protected:
QNetworkReply *createRequest(Operation op, const QNetworkRequest &request, QIODevice *outgoingData) {
if (_cred->user().isEmpty() || _cred->password().isEmpty() || _cred->_token.isEmpty()) {
qWarning() << Q_FUNC_INFO << "Empty user/password/token provided!";
}
QNetworkRequest req(request);
QByteArray credHash = QByteArray(_cred->user().toUtf8()+":"+_cred->password().toUtf8()).toBase64();
QNetworkRequest req(request);
req.setRawHeader(QByteArray("Authorization"), QByteArray("Basic ") + credHash);
//qDebug() << "Request for " << req.url() << "with authorization" << QByteArray::fromBase64(credHash);
// A pre-authenticated cookie
QByteArray token = _cred->_token.toUtf8();
setRawCookie(token, request.url());
// Append token cookie
QList<QNetworkCookie> cookies = request.header(QNetworkRequest::CookieHeader).value<QList<QNetworkCookie> >();
cookies.append(QNetworkCookie::parseCookies(_cred->_token.toUtf8()));
req.setHeader(QNetworkRequest::CookieHeader, QVariant::fromValue(cookies));
return MirallAccessManager::createRequest(op, req, outgoingData);
}
@@ -165,6 +161,12 @@ bool TokenCredentials::ready() const
return _ready;
}
QString TokenCredentials::fetchUser(Account* account)
{
_user = account->credentialSetting(QLatin1String(userC)).toString();
return _user;
}
void TokenCredentials::fetch(Account *account)
{
if( !account ) {
@@ -172,11 +174,10 @@ void TokenCredentials::fetch(Account *account)
}
Q_EMIT fetched();
}
bool TokenCredentials::stillValid(QNetworkReply *reply)
{
return ((reply->error() != QNetworkReply::AuthenticationRequiredError)
// returned if user/password or token are incorrect
// returned if user or password is incorrect
&& (reply->error() != QNetworkReply::OperationCanceledError
|| !reply->property(authenticationFailedC).toBool()));
}
@@ -188,12 +189,19 @@ QString TokenCredentials::queryPassword(bool *ok)
void TokenCredentials::invalidateToken(Account *account)
{
qDebug() << Q_FUNC_INFO;
_ready = false;
account->clearCookieJar();
_token = QString();
_user = QString();
_password = QString();
_ready = false;
// User must be fetched from config file to generate a valid key
fetchUser(account);
const QString kck = keychainKey(account->url().toString(), _user);
if( kck.isEmpty() ) {
qDebug() << "InvalidateToken: User is empty, bailing out!";
return;
}
account->clearCookieJar();
}
void TokenCredentials::persist(Account *account)
+2 -1
Ver Arquivo
@@ -53,6 +53,7 @@ public:
QString password() const;
QString queryPassword(bool *ok);
void invalidateToken(Account *account);
QString fetchUser(Account *account);
private Q_SLOTS:
void slotAuthentication(QNetworkReply*, QAuthenticator*);
@@ -60,7 +61,7 @@ private Q_SLOTS:
private:
QString _user;
QString _password;
QString _token; // the cookies
QString _token;
bool _ready;
};
+25 -5
Ver Arquivo
@@ -172,6 +172,8 @@ void AccountSettings::slotAddFolder()
folderMan->setSyncEnabled(false); // do not start more syncs.
FolderWizard *folderWizard = new FolderWizard(this);
Folder::Map folderMap = folderMan->map();
folderWizard->setFolderMap( folderMap );
connect(folderWizard, SIGNAL(accepted()), SLOT(slotFolderWizardAccepted()));
connect(folderWizard, SIGNAL(rejected()), SLOT(slotFolderWizardRejected()));
@@ -416,6 +418,28 @@ void AccountSettings::setFolderList( const Folder::Map &folders )
}
// move from Application
void AccountSettings::slotFolderOpenAction( const QString& alias )
{
Folder *f = FolderMan::instance()->folder(alias);
qDebug() << "opening local url " << f->path();
if( f ) {
QUrl url(f->path(), QUrl::TolerantMode);
url.setScheme( QLatin1String("file") );
#ifdef Q_OS_WIN
// work around a bug in QDesktopServices on Win32, see i-net
QString filePath = f->path();
if (filePath.startsWith(QLatin1String("\\\\")) || filePath.startsWith(QLatin1String("//")))
url.setUrl(QDir::toNativeSeparators(filePath));
else
url = QUrl::fromLocalFile(filePath);
#endif
QDesktopServices::openUrl(url);
}
}
void AccountSettings::slotEnableCurrentFolder()
{
QModelIndex selected = ui->_folderList->selectionModel()->currentIndex();
@@ -432,11 +456,7 @@ void AccountSettings::slotEnableCurrentFolder()
// this sets the folder status to disabled but does not interrupt it.
Folder *f = folderMan->folder( alias );
if (!f) {
return;
}
if( folderEnabled ) {
if( f && folderEnabled ) {
// check if a sync is still running and if so, ask if we should terminate.
if( f->isBusy() ) { // its still running
#if defined(Q_OS_MAC)
+1
Ver Arquivo
@@ -60,6 +60,7 @@ public slots:
void slotOpenOC();
void slotUpdateFolderState( Folder* );
void slotDoubleClicked( const QModelIndex& );
void slotFolderOpenAction( const QString& );
void slotSetProgress(const QString& folder, const Progress::Info& progress);
void slotButtonsSetEnabled();
+1 -1
Ver Arquivo
@@ -71,7 +71,7 @@ QString applicationTrPath()
#elif defined(Q_OS_MAC)
return QApplication::applicationDirPath()+QLatin1String("/../Resources/Translations"); // path defaults to app dir.
#elif defined(Q_OS_UNIX)
return QString::fromLatin1(DATADIR "/" APPLICATION_EXECUTABLE "/i18n/");
return QString::fromLatin1(DATADIR"/"APPLICATION_EXECUTABLE"/i18n/");
#endif
}
}
-408
Ver Arquivo
@@ -1,408 +0,0 @@
/*
* Copyright (C) by Markus Goetz <markus@woboq.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*/
#include "owncloudpropagator.h"
#include "propagator_qnam.h"
#include "propagatorjobs.h"
#include "propagator_legacy.h"
#include "mirall/utility.h"
#ifdef Q_OS_WIN
#include <windef.h>
#include <winbase.h>
#endif
#include <QTimer>
#include <QObject>
namespace Mirall {
// Because of the many layers of buffering inside Qt (and probably the OS and the network)
// we cannot lower this value much more. If we do, the estimated bw will be very high
// because the buffers fill fast while the actual network algorithms are not relevant yet.
static qint64 relativeLimitMeasuringTimerIntervalMsec = 1000*2;
// See also WritingState in http://code.woboq.org/qt5/qtbase/src/network/access/qhttpprotocolhandler.cpp.html#_ZN20QHttpProtocolHandler11sendRequestEv
// FIXME At some point:
// * Register device only after the QNR received its metaDataChanged() signal
// * Incorporate Qt buffer fill state (it's a negative absolute delta).
// * Incorporate SSL overhead (percentage)
// * For relative limiting, do less measuring and more delaying+giving quota
// * For relative limiting, smoothen measurements
BandwidthManager::BandwidthManager(OwncloudPropagator *p) : QObject(),
_propagator(p),
_relativeLimitCurrentMeasuredDevice(0),
_relativeUploadLimitProgressAtMeasuringRestart(0),
_currentUploadLimit(0),
_relativeLimitCurrentMeasuredJob(0),
_currentDownloadLimit(0)
{
_currentUploadLimit = _propagator->_uploadLimit.fetchAndAddAcquire(0);
_currentDownloadLimit = _propagator->_downloadLimit.fetchAndAddAcquire(0);
QObject::connect(&_switchingTimer, SIGNAL(timeout()), this, SLOT(switchingTimerExpired()));
_switchingTimer.setInterval(10*1000);
_switchingTimer.start();
QMetaObject::invokeMethod(this, "switchingTimerExpired", Qt::QueuedConnection);
// absolute uploads/downloads
QObject::connect(&_absoluteLimitTimer, SIGNAL(timeout()), this, SLOT(absoluteLimitTimerExpired()));
_absoluteLimitTimer.setInterval(1000);
_absoluteLimitTimer.start();
// Relative uploads
QObject::connect(&_relativeUploadMeasuringTimer,SIGNAL(timeout()),
this, SLOT(relativeUploadMeasuringTimerExpired()));
_relativeUploadMeasuringTimer.setInterval(relativeLimitMeasuringTimerIntervalMsec);
_relativeUploadMeasuringTimer.start();
_relativeUploadMeasuringTimer.setSingleShot(true); // will be restarted from the delay timer
QObject::connect(&_relativeUploadDelayTimer, SIGNAL(timeout()),
this, SLOT(relativeUploadDelayTimerExpired()));
_relativeUploadDelayTimer.setSingleShot(true); // will be restarted from the measuring timer
// Relative downloads
QObject::connect(&_relativeDownloadMeasuringTimer,SIGNAL(timeout()),
this, SLOT(relativeDownloadMeasuringTimerExpired()));
_relativeDownloadMeasuringTimer.setInterval(relativeLimitMeasuringTimerIntervalMsec);
_relativeDownloadMeasuringTimer.start();
_relativeDownloadMeasuringTimer.setSingleShot(true); // will be restarted from the delay timer
QObject::connect(&_relativeDownloadDelayTimer, SIGNAL(timeout()),
this, SLOT(relativeDownloadDelayTimerExpired()));
_relativeDownloadDelayTimer.setSingleShot(true); // will be restarted from the measuring timer
}
void BandwidthManager::registerUploadDevice(UploadDevice *p)
{
qDebug() << Q_FUNC_INFO << p;
_absoluteUploadDeviceList.append(p);
_relativeUploadDeviceList.append(p);
QObject::connect(p, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterUploadDevice(QObject*)));
if (usingAbsoluteUploadLimit()) {
p->setBandwidthLimited(true);
p->setChoked(false);
} else if (usingRelativeUploadLimit()) {
p->setBandwidthLimited(true);
p->setChoked(true);
} else {
p->setBandwidthLimited(false);
p->setChoked(false);
}
}
void BandwidthManager::unregisterUploadDevice(QObject *o)
{
UploadDevice *p = qobject_cast<UploadDevice*>(o);
if (p) {
unregisterUploadDevice(p);
}
}
void BandwidthManager::unregisterUploadDevice(UploadDevice* p)
{
qDebug() << Q_FUNC_INFO << p;
_absoluteUploadDeviceList.removeAll(p);
_relativeUploadDeviceList.removeAll(p);
if (p == _relativeLimitCurrentMeasuredDevice) {
_relativeLimitCurrentMeasuredDevice = 0;
_relativeUploadLimitProgressAtMeasuringRestart = 0;
}
}
void BandwidthManager::registerDownloadJob(GETFileJob* j)
{
qDebug() << Q_FUNC_INFO << j;
_downloadJobList.append(j);
QObject::connect(j, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterDownloadJob(QObject*)));
if (usingAbsoluteDownloadLimit()) {
j->setBandwidthLimited(true);
j->setChoked(false);
} else if (usingRelativeDownloadLimit()) {
j->setBandwidthLimited(true);
j->setChoked(true);
} else {
j->setBandwidthLimited(false);
j->setChoked(false);
}
}
void BandwidthManager::unregisterDownloadJob(GETFileJob* j)
{
_downloadJobList.removeAll(j);
if (_relativeLimitCurrentMeasuredJob == j) {
_relativeLimitCurrentMeasuredJob = 0;
_relativeDownloadLimitProgressAtMeasuringRestart = 0;
}
}
void BandwidthManager::unregisterDownloadJob(QObject* o)
{
GETFileJob *p = qobject_cast<GETFileJob*>(o);
if (p) {
unregisterDownloadJob(p);
}
}
void BandwidthManager::relativeUploadMeasuringTimerExpired()
{
if (!usingRelativeUploadLimit() || _relativeUploadDeviceList.count() == 0) {
// Not in this limiting mode, just wait 1 sec to continue the cycle
_relativeUploadDelayTimer.setInterval(1000);
_relativeUploadDelayTimer.start();
return;
}
if (_relativeLimitCurrentMeasuredDevice == 0) {
qDebug() << Q_FUNC_INFO << "No device set, just waiting 1 sec";
_relativeUploadDelayTimer.setInterval(1000);
_relativeUploadDelayTimer.start();
return;
}
qDebug() << Q_FUNC_INFO << _relativeUploadDeviceList.count() << "Starting Delay";
qint64 relativeLimitProgressMeasured = (_relativeLimitCurrentMeasuredDevice->_readWithProgress
+ _relativeLimitCurrentMeasuredDevice->_read) / 2;
qint64 relativeLimitProgressDifference = relativeLimitProgressMeasured - _relativeUploadLimitProgressAtMeasuringRestart;
qDebug() << Q_FUNC_INFO << _relativeUploadLimitProgressAtMeasuringRestart
<< relativeLimitProgressMeasured << relativeLimitProgressDifference;
qint64 speedkBPerSec = (relativeLimitProgressDifference / relativeLimitMeasuringTimerIntervalMsec*1000.0) / 1024.0;
qDebug() << Q_FUNC_INFO << relativeLimitProgressDifference/1024 <<"kB =>" << speedkBPerSec << "kB/sec on full speed ("
<< _relativeLimitCurrentMeasuredDevice->_readWithProgress << _relativeLimitCurrentMeasuredDevice->_read
<< qAbs(_relativeLimitCurrentMeasuredDevice->_readWithProgress
- _relativeLimitCurrentMeasuredDevice->_read) << ")";
qint64 uploadLimitPercent = -_currentUploadLimit;
// don't use too extreme values
uploadLimitPercent = qMin(uploadLimitPercent, qint64(90));
uploadLimitPercent = qMax(qint64(10), uploadLimitPercent);
qint64 wholeTimeMsec = (100.0 / uploadLimitPercent) * relativeLimitMeasuringTimerIntervalMsec;
qint64 waitTimeMsec = wholeTimeMsec - relativeLimitMeasuringTimerIntervalMsec;
qint64 realWaitTimeMsec = waitTimeMsec + wholeTimeMsec;
qDebug() << Q_FUNC_INFO << waitTimeMsec << " - "<< realWaitTimeMsec <<
" msec for " << uploadLimitPercent << "%";
qDebug() << Q_FUNC_INFO << "XXXX" << uploadLimitPercent << relativeLimitMeasuringTimerIntervalMsec;
// We want to wait twice as long since we want to give all
// devices the same quota we used now since we don't want
// any upload to timeout
_relativeUploadDelayTimer.setInterval(realWaitTimeMsec);
_relativeUploadDelayTimer.start();
int deviceCount = _relativeUploadDeviceList.count();
qint64 quotaPerDevice = relativeLimitProgressDifference * (uploadLimitPercent / 100.0) / deviceCount + 1.0;
qDebug() << Q_FUNC_INFO << "YYYY" << relativeLimitProgressDifference << uploadLimitPercent << deviceCount;
Q_FOREACH(UploadDevice *ud, _relativeUploadDeviceList) {
ud->setBandwidthLimited(true);
ud->setChoked(false);
ud->giveBandwidthQuota(quotaPerDevice);
qDebug() << Q_FUNC_INFO << "Gave" << quotaPerDevice/1024.0 << "kB to" << ud;
}
_relativeLimitCurrentMeasuredDevice = 0;
}
void BandwidthManager::relativeUploadDelayTimerExpired()
{
// Switch to measuring state
_relativeUploadMeasuringTimer.start(); // always start to continue the cycle
if (!usingRelativeUploadLimit()) {
return; // oh, not actually needed
}
if (_relativeUploadDeviceList.isEmpty()) {
return;
}
qDebug() << Q_FUNC_INFO << _relativeUploadDeviceList.count() << "Starting measuring";
// Take first device and then append it again (= we round robin all devices)
_relativeLimitCurrentMeasuredDevice = _relativeUploadDeviceList.takeFirst();
_relativeUploadDeviceList.append(_relativeLimitCurrentMeasuredDevice);
_relativeUploadLimitProgressAtMeasuringRestart = (_relativeLimitCurrentMeasuredDevice->_readWithProgress
+ _relativeLimitCurrentMeasuredDevice->_read) / 2;
_relativeLimitCurrentMeasuredDevice->setBandwidthLimited(false);
_relativeLimitCurrentMeasuredDevice->setChoked(false);
// choke all other UploadDevices
Q_FOREACH(UploadDevice *ud, _relativeUploadDeviceList) {
if (ud != _relativeLimitCurrentMeasuredDevice) {
ud->setBandwidthLimited(true);
ud->setChoked(true);
}
}
// now we're in measuring state
}
// for downloads:
void BandwidthManager::relativeDownloadMeasuringTimerExpired()
{
if (!usingRelativeDownloadLimit() || _downloadJobList.count() == 0) {
// Not in this limiting mode, just wait 1 sec to continue the cycle
_relativeDownloadDelayTimer.setInterval(1000);
_relativeDownloadDelayTimer.start();
return;
}
if (_relativeLimitCurrentMeasuredJob == 0) {
qDebug() << Q_FUNC_INFO << "No job set, just waiting 1 sec";
_relativeDownloadDelayTimer.setInterval(1000);
_relativeDownloadDelayTimer.start();
return;
}
qDebug() << Q_FUNC_INFO << _downloadJobList.count() << "Starting Delay";
qint64 relativeLimitProgressMeasured = _relativeLimitCurrentMeasuredJob->currentDownloadPosition();
qint64 relativeLimitProgressDifference = relativeLimitProgressMeasured - _relativeDownloadLimitProgressAtMeasuringRestart;
qDebug() << Q_FUNC_INFO << _relativeDownloadLimitProgressAtMeasuringRestart
<< relativeLimitProgressMeasured << relativeLimitProgressDifference;
qint64 speedkBPerSec = (relativeLimitProgressDifference / relativeLimitMeasuringTimerIntervalMsec*1000.0) / 1024.0;
qDebug() << Q_FUNC_INFO << relativeLimitProgressDifference/1024 <<"kB =>" << speedkBPerSec << "kB/sec on full speed ("
<< _relativeLimitCurrentMeasuredJob->currentDownloadPosition() ;
qint64 downloadLimitPercent = -_currentDownloadLimit;
// don't use too extreme values
downloadLimitPercent = qMin(downloadLimitPercent, qint64(90));
downloadLimitPercent = qMax(qint64(10), downloadLimitPercent);
qint64 wholeTimeMsec = (100.0 / downloadLimitPercent) * relativeLimitMeasuringTimerIntervalMsec;
qint64 waitTimeMsec = wholeTimeMsec - relativeLimitMeasuringTimerIntervalMsec;
qint64 realWaitTimeMsec = waitTimeMsec + wholeTimeMsec;
qDebug() << Q_FUNC_INFO << waitTimeMsec << " - "<< realWaitTimeMsec <<
" msec for " << downloadLimitPercent << "%";
qDebug() << Q_FUNC_INFO << "XXXX" << downloadLimitPercent << relativeLimitMeasuringTimerIntervalMsec;
// We want to wait twice as long since we want to give all
// devices the same quota we used now since we don't want
// any upload to timeout
_relativeDownloadDelayTimer.setInterval(realWaitTimeMsec);
_relativeDownloadDelayTimer.start();
int jobCount = _downloadJobList.count();
qint64 quota = relativeLimitProgressDifference * (downloadLimitPercent / 100.0);
// if (quota > 20*1024) {
// qDebug() << "======== ADJUSTING QUOTA FROM " << quota << " TO " << quota - 20*1024;
// quota -= 20*1024;
// }
qint64 quotaPerJob = quota / jobCount + 1.0;
qDebug() << Q_FUNC_INFO << "YYYY" << relativeLimitProgressDifference << downloadLimitPercent << jobCount;
Q_FOREACH(GETFileJob *gfj, _downloadJobList) {
gfj->setBandwidthLimited(true);
gfj->setChoked(false);
gfj->giveBandwidthQuota(quotaPerJob);
qDebug() << Q_FUNC_INFO << "Gave" << quotaPerJob/1024.0 << "kB to" << gfj;
}
_relativeLimitCurrentMeasuredDevice = 0;
}
void BandwidthManager::relativeDownloadDelayTimerExpired()
{
// Switch to measuring state
_relativeDownloadMeasuringTimer.start(); // always start to continue the cycle
if (!usingRelativeDownloadLimit()) {
return; // oh, not actually needed
}
if (_downloadJobList.isEmpty()) {
//qDebug() << Q_FUNC_INFO << _downloadJobList.count() << "No jobs?";
return;
}
qDebug() << Q_FUNC_INFO << _downloadJobList.count() << "Starting measuring";
// Take first device and then append it again (= we round robin all devices)
_relativeLimitCurrentMeasuredJob = _downloadJobList.takeFirst();
_downloadJobList.append(_relativeLimitCurrentMeasuredJob);
_relativeDownloadLimitProgressAtMeasuringRestart = _relativeLimitCurrentMeasuredJob->currentDownloadPosition();
_relativeLimitCurrentMeasuredJob->setBandwidthLimited(false);
_relativeLimitCurrentMeasuredJob->setChoked(false);
// choke all other UploadDevices
Q_FOREACH(GETFileJob *gfj, _downloadJobList) {
if (gfj != _relativeLimitCurrentMeasuredJob) {
gfj->setBandwidthLimited(true);
gfj->setChoked(true);
}
}
// now we're in measuring state
}
// end downloads
void BandwidthManager::switchingTimerExpired() {
qint64 newUploadLimit = _propagator->_uploadLimit.fetchAndAddAcquire(0);
if (newUploadLimit != _currentUploadLimit) {
qDebug() << Q_FUNC_INFO << "Upload Bandwidth limit changed" << _currentUploadLimit << newUploadLimit;
_currentUploadLimit = newUploadLimit;
Q_FOREACH(UploadDevice *ud, _relativeUploadDeviceList) {
if (newUploadLimit == 0) {
ud->setBandwidthLimited(false);
ud->setChoked(false);
} else if (newUploadLimit > 0) {
ud->setBandwidthLimited(true);
ud->setChoked(false);
} else if (newUploadLimit < 0) {
ud->setBandwidthLimited(true);
ud->setChoked(true);
}
}
}
qint64 newDownloadLimit = _propagator->_downloadLimit.fetchAndAddAcquire(0);
if (newDownloadLimit != _currentDownloadLimit) {
qDebug() << Q_FUNC_INFO << "Download Bandwidth limit changed" << _currentDownloadLimit << newDownloadLimit;
_currentDownloadLimit = newDownloadLimit;
Q_FOREACH(GETFileJob *j, _downloadJobList) {
if (usingAbsoluteDownloadLimit()) {
j->setBandwidthLimited(true);
j->setChoked(false);
} else if (usingRelativeDownloadLimit()) {
j->setBandwidthLimited(true);
j->setChoked(true);
} else {
j->setBandwidthLimited(false);
j->setChoked(false);
}
}
}
}
void BandwidthManager::absoluteLimitTimerExpired()
{
if (usingAbsoluteUploadLimit() && _absoluteUploadDeviceList.count() > 0) {
qint64 quotaPerDevice = _currentUploadLimit / qMax(1, _absoluteUploadDeviceList.count());
qDebug() << Q_FUNC_INFO << quotaPerDevice << _absoluteUploadDeviceList.count() << _currentUploadLimit;
Q_FOREACH(UploadDevice *device, _absoluteUploadDeviceList) {
device->giveBandwidthQuota(quotaPerDevice);
qDebug() << Q_FUNC_INFO << "Gave " << quotaPerDevice/1024.0 << " kB to" << device;
}
}
if (usingAbsoluteDownloadLimit() && _downloadJobList.count() > 0) {
qint64 quotaPerJob = _currentDownloadLimit / qMax(1, _downloadJobList.count());
qDebug() << Q_FUNC_INFO << quotaPerJob << _downloadJobList.count() << _currentDownloadLimit;
Q_FOREACH(GETFileJob *j, _downloadJobList) {
j->giveBandwidthQuota(quotaPerJob);
qDebug() << Q_FUNC_INFO << "Gave " << quotaPerJob/1024.0 << " kB to" << j;
}
}
}
}
-83
Ver Arquivo
@@ -1,83 +0,0 @@
/*
* Copyright (C) by Markus Goetz <markus@woboq.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*/
#ifndef BANDWIDTHMANAGER_H
#define BANDWIDTHMANAGER_H
#include <QObject>
#include <QLinkedList>
#include <QTimer>
#include <QIODevice>
namespace Mirall {
class UploadDevice;
class GETFileJob;
class OwncloudPropagator;
class BandwidthManager : public QObject {
Q_OBJECT
public:
BandwidthManager(OwncloudPropagator *p);
bool usingAbsoluteUploadLimit() { return _currentUploadLimit > 0; }
bool usingRelativeUploadLimit() { return _currentUploadLimit < 0; }
bool usingAbsoluteDownloadLimit() { return _currentDownloadLimit > 0; }
bool usingRelativeDownloadLimit() { return _currentDownloadLimit < 0; }
public slots:
void registerUploadDevice(UploadDevice*);
void unregisterUploadDevice(UploadDevice*);
void unregisterUploadDevice(QObject*);
void registerDownloadJob(GETFileJob*);
void unregisterDownloadJob(GETFileJob*);
void unregisterDownloadJob(QObject*);
void absoluteLimitTimerExpired();
void switchingTimerExpired();
void relativeUploadMeasuringTimerExpired();
void relativeUploadDelayTimerExpired();
void relativeDownloadMeasuringTimerExpired();
void relativeDownloadDelayTimerExpired();
private:
QTimer _switchingTimer; // for switching between absolute and relative bw limiting
OwncloudPropagator *_propagator; // FIXME this timer and this variable should be replaced
// by the propagator emitting the changed limit values to us as signal
QTimer _absoluteLimitTimer; // for absolute up/down bw limiting
QLinkedList<UploadDevice*> _absoluteUploadDeviceList;
QLinkedList<UploadDevice*> _relativeUploadDeviceList; // FIXME merge with list above ^^
QTimer _relativeUploadMeasuringTimer;
QTimer _relativeUploadDelayTimer; // for relative bw limiting, we need to wait this amount before measuring again
UploadDevice *_relativeLimitCurrentMeasuredDevice; // the device measured
qint64 _relativeUploadLimitProgressAtMeasuringRestart; // for measuring how much progress we made at start
qint64 _currentUploadLimit;
QLinkedList<GETFileJob*> _downloadJobList;
QTimer _relativeDownloadMeasuringTimer;
QTimer _relativeDownloadDelayTimer; // for relative bw limiting, we need to wait this amount before measuring again
GETFileJob *_relativeLimitCurrentMeasuredJob; // the device measured
qint64 _relativeDownloadLimitProgressAtMeasuringRestart; // for measuring how much progress we made at start
qint64 _currentDownloadLimit;
};
}
#endif
+21 -42
Ver Arquivo
@@ -266,7 +266,6 @@ void Folder::slotPollTimerTimeout()
qDebug() << "* Polling" << alias() << "for changes. (time since last sync:" << (_timeSinceLastSync.elapsed() / 1000) << "s)";
if (quint64(_timeSinceLastSync.elapsed()) > MirallConfigFile().forceSyncInterval() ||
_lastEtag.isNull() ||
!(_syncResult.status() == SyncResult::Success ||_syncResult.status() == SyncResult::Problem)) {
qDebug() << "** Force Sync now, state is " << _syncResult.statusString();
emit scheduleToSync(alias());
@@ -604,8 +603,7 @@ void Folder::startSync(const QStringList &pathList)
connect(_engine.data(), SIGNAL(aboutToRemoveAllFiles(SyncFileItem::Direction,bool*)),
SLOT(slotAboutToRemoveAllFiles(SyncFileItem::Direction,bool*)));
connect(_engine.data(), SIGNAL(transmissionProgress(Progress::Info)), this, SLOT(slotTransmissionProgress(Progress::Info)));
setDirtyNetworkLimits();
connect(_engine.data(), SIGNAL(jobCompleted(SyncFileItem)), this, SLOT(slotJobCompleted(SyncFileItem)));
QMetaObject::invokeMethod(_engine.data(), "startSync", Qt::QueuedConnection);
@@ -618,21 +616,7 @@ void Folder::startSync(const QStringList &pathList)
void Folder::setDirtyNetworkLimits()
{
if (_engine) {
MirallConfigFile cfg;
int downloadLimit = 0;
if (cfg.useDownloadLimit()) {
downloadLimit = cfg.downloadLimit() * 1000;
}
int uploadLimit = -75; // 75%
int useUpLimit = cfg.useUploadLimit();
if ( useUpLimit >= 1) {
uploadLimit = cfg.uploadLimit() * 1000;
} else if (useUpLimit == 0) {
uploadLimit = 0;
}
_engine->setNetworkLimits(uploadLimit, downloadLimit);
_engine->setNetworkLimits();
}
}
@@ -660,13 +644,10 @@ void Folder::slotSyncFinished()
bubbleUpSyncResult();
bool anotherSyncNeeded = false;
if (_engine) {
anotherSyncNeeded = _engine->isAnotherSyncNeeded();
_engine.reset(0);
}
_engine.reset(0);
// _watcher->setEventsEnabledDelayed(2000);
_pollTimer.start();
_timeSinceLastSync.restart();
if (_csyncError) {
@@ -693,16 +674,6 @@ void Folder::slotSyncFinished()
// all come in.
QTimer::singleShot(200, this, SLOT(slotEmitFinishedDelayed() ));
if (!anotherSyncNeeded) {
_pollTimer.start();
_timeSinceLastSync.restart();
} else {
// Another sync is required. We will make sure that the poll timer occurs soon enough
// and we clear the etag to force a sync
_lastEtag.clear();
QTimer::singleShot(1000, this, SLOT(slotPollTimerTimeout() ));
}
}
void Folder::slotEmitFinishedDelayed()
@@ -716,23 +687,31 @@ void Folder::slotEmitFinishedDelayed()
// and hand the result over to the progress dispatcher.
void Folder::slotTransmissionProgress(const Progress::Info &pi)
{
if (!pi._lastCompletedItem.isEmpty()
&& Progress::isWarningKind(pi._lastCompletedItem._status)) {
// Count all error conditions.
_syncResult.setWarnCount(_syncResult.warnCount()+1);
}
// remember problems happening to set the correct Sync status in slot slotCSyncFinished.
if( pi._completedFileCount ) {
// No job completed yet, this is the beginning of a sync, set the warning level to 0
_syncResult.setWarnCount(0);
}
ProgressDispatcher::instance()->setProgressInfo(alias(), pi);
}
// a job is completed: count the errors and forward to the ProgressDispatcher
void Folder::slotJobCompleted(const SyncFileItem &item)
{
if (Progress::isWarningKind(item._status)) {
// Count all error conditions.
_syncResult.setWarnCount(_syncResult.warnCount()+1);
}
emit ProgressDispatcher::instance()->jobCompleted(alias(), item);
}
void Folder::slotAboutToRemoveAllFiles(SyncFileItem::Direction direction, bool *cancel)
{
#ifndef TOKEN_AUTH_ONLY
QString msg =
QString msg = direction == SyncFileItem::Down ?
tr("This sync would remove all the files in the local sync folder '%1'.\n"
"If you or your administrator have reset your account on the server, choose "
"\"Keep files\". If you want your data to be removed, choose \"Remove all files\".") :
tr("This sync would remove all the files in the sync folder '%1'.\n"
"This might be because the folder was silently reconfigured, or that all "
"the file were manually removed.\n"
+2
Ver Arquivo
@@ -185,6 +185,7 @@ private slots:
void slotSyncFinished();
void slotTransmissionProgress(const Progress::Info& pi);
void slotJobCompleted(const SyncFileItem&);
void slotPollTimerTimeout();
void etagRetreived(const QString &);
@@ -210,6 +211,7 @@ private:
QString _remotePath;
QString _alias;
QString _configFile;
QFileSystemWatcher *_pathWatcher;
bool _enabled;
SyncResult _syncResult;
QScopedPointer<SyncEngine> _engine;
+3
Ver Arquivo
@@ -56,6 +56,9 @@ class FolderStatusDelegate : public QStyledItemDelegate
QSize sizeHint( const QStyleOptionViewItem&, const QModelIndex& ) const;
bool editorEvent( QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option,
const QModelIndex& index );
private:
bool _addProgressSpace;
};
} // namespace Mirall
+10 -6
Ver Arquivo
@@ -104,7 +104,7 @@ bool FolderWizardLocalPath::isComplete() const
}
// check if the local directory isn't used yet in another ownCloud sync
Folder::Map map = FolderMan::instance()->map();
Folder::Map map = _folderMap;
if( isOk ) {
Folder::Map::const_iterator i = map.constBegin();
@@ -170,8 +170,8 @@ bool FolderWizardLocalPath::isComplete() const
bool goon = true;
while( goon && i != map.constEnd() ) {
Folder *f = i.value();
qDebug() << "Checking local alias: " << f->alias();
if( f ) {
qDebug() << "Checking local alias: " << f->alias();
if( f->alias() == alias ) {
warnStrings.append( tr("The alias <i>%1</i> is already in use. Please pick another alias.").arg(alias) );
isOk = false;
@@ -224,10 +224,7 @@ void FolderWizardLocalPath::slotChooseLocalFolder()
// =================================================================================
FolderWizardRemotePath::FolderWizardRemotePath()
: FormatWarningsWizardPage()
, _ownCloudDirCheck(0)
, _dirChecked(false)
,_warnWasVisible(false)
{
_ui.setupUi(this);
_ui.warnFrame->hide();
@@ -377,7 +374,7 @@ bool FolderWizardRemotePath::isComplete() const
}
wizard()->setProperty("targetPath", dir);
Folder::Map map = FolderMan::instance()->map();
Folder::Map map = _folderMap;
Folder::Map::const_iterator i = map.constBegin();
for(i = map.constBegin();i != map.constEnd(); i++ ) {
Folder *f = static_cast<Folder*>(i.value());
@@ -451,6 +448,13 @@ FolderWizard::~FolderWizard()
{
}
void FolderWizard::setFolderMap( const Folder::Map& fm)
{
_folderWizardSourcePage->setFolderMap( fm );
if (!Theme::instance()->singleSyncFolder()) {
_folderWizardTargetPage->setFolderMap( fm );
}
}
} // end namespace
+4 -1
Ver Arquivo
@@ -73,6 +73,8 @@ public:
virtual void initializePage();
virtual void cleanupPage();
void setFolderMap( const Folder::Map &fm ) { _folderMap = fm; }
protected slots:
void showWarn( const QString& = QString() ) const;
@@ -89,7 +91,7 @@ private:
ownCloudInfo *_ownCloudDirCheck;
bool _dirChecked;
bool _warnWasVisible;
Folder::Map _folderMap;
};
/**
@@ -107,6 +109,7 @@ public:
FolderWizard(QWidget *parent = 0);
~FolderWizard();
void setFolderMap( const Folder::Map &map );
private:
-20
Ver Arquivo
@@ -15,8 +15,6 @@
#include <QNetworkProxy>
#include <QAuthenticator>
#include <QSslConfiguration>
#include <QNetworkCookie>
#include <QNetworkCookieJar>
#include "mirall/cookiejar.h"
#include "mirall/mirallaccessmanager.h"
@@ -39,27 +37,9 @@ MirallAccessManager::MirallAccessManager(QObject* parent)
this, SLOT(slotProxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
}
void MirallAccessManager::setRawCookie(const QByteArray &rawCookie, const QUrl &url)
{
QNetworkCookie cookie(rawCookie.left(rawCookie.indexOf('=')),
rawCookie.mid(rawCookie.indexOf('=')+1));
qDebug() << Q_FUNC_INFO << cookie.name() << cookie.value();
QList<QNetworkCookie> cookieList;
cookieList.append(cookie);
QNetworkCookieJar *jar = cookieJar();
jar->setCookiesFromUrl(cookieList, url);
}
QNetworkReply* MirallAccessManager::createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest& request, QIODevice* outgoingData)
{
QNetworkRequest newRequest(request);
if (newRequest.hasRawHeader("cookie")) {
// This will set the cookie into the QNetworkCookieJar which will then override the cookie header
setRawCookie(request.rawHeader("cookie"), request.url());
}
newRequest.setRawHeader(QByteArray("User-Agent"), Utility::userAgentString());
QByteArray verb = newRequest.attribute(QNetworkRequest::CustomVerbAttribute).toByteArray();
// For PROPFIND (assumed to be a WebDAV op), set xml/utf8 as content type/encoding

Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais