https://bugs.winehq.org/show_bug.cgi?id=50756
Louis Lenders xerox.xerox2000x@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|"Call not implemented" when |"Path is Invalid" when |using "SVN update" with |using "SVN update" with |TortoiseSVN |TortoiseSVN
--- Comment #14 from Louis Lenders xerox.xerox2000x@gmail.com --- Hi, I found maybe for others easier to reproduce this bug one could also do checkout a svn tree:
wine TortoiseProc.exe /command:checkout http://svn.forge.scilab.org/scilab2c
then just hit ok.
I don`t know how to fix this bug but your remark that it`s in svn led me to source that might help solve this bug:
https://github.com/apache/subversion/blob/trunk/subversion/libsvn_subr/io.c
Maybe wine returns wrong status on error , no idea; if you add dumb hack to set error always to STATUS_ACCESS_DENIED in SetFileInformationByHandle (..,FileRenameinfo,..,..) the checkout starts to work
Btw source apparently has fallback is SetFileInformationHandle is not found, very sad workaround is to just replace the string "SetFileInformationByHandle" with bogus string (with same length) in libsvn_tsvn.dll, but that`s cheating ;)
relevant part of source:
svn_error_t * svn_io__win_rename_open_file(apr_file_t *file, const char *from_path, const char *to_path, apr_pool_t *pool) { WCHAR *w_final_abspath; size_t path_len; size_t rename_size; FILE_RENAME_INFO *rename_info; HANDLE hFile; apr_status_t status;
apr_os_file_get(&hFile, file);
SVN_ERR(svn_io__utf8_to_unicode_longpath( &w_final_abspath, svn_dirent_local_style(to_path,pool), pool));
path_len = wcslen(w_final_abspath); rename_size = sizeof(*rename_info) + sizeof(WCHAR) * path_len;
/* The rename info struct doesn't need hacks for long paths, so no ugly escaping calls here */ rename_info = apr_pcalloc(pool, rename_size); rename_info->ReplaceIfExists = TRUE; rename_info->FileNameLength = path_len; memcpy(rename_info->FileName, w_final_abspath, path_len * sizeof(WCHAR));
status = win32_set_file_information_by_handle(hFile, FileRenameInfo, rename_info, rename_size);
if (APR_STATUS_IS_EACCES(status) || APR_STATUS_IS_EEXIST(status)) { /* Set the destination file writable because Windows will not allow us to rename when final_abspath is read-only. */ SVN_ERR(svn_io_set_file_read_write(to_path, TRUE, pool));
status = win32_set_file_information_by_handle(hFile, FileRenameInfo, rename_info, rename_size); }
/* Windows returns Vista+ client accessing network share stored on Windows Server 2003 returns ERROR_ACCESS_DENIED. The same happens when Vista+ client access Windows Server 2008 with disabled SMBv2 protocol.
So return SVN_ERR_UNSUPPORTED_FEATURE in this case like we do when SetFileInformationByHandle() is not available and let caller to handle it.
See "Access denied error on checkout-commit after updating to 1.9.X" discussion on dev@s.a.o: http://svn.haxx.se/dev/archive-2015-09/0054.shtml */ if (status == APR_FROM_OS_ERROR(ERROR_ACCESS_DENIED)) { status = SVN_ERR_UNSUPPORTED_FEATURE; }
if (status) { return svn_error_wrap_apr(status, _("Can't move '%s' to '%s'"), svn_dirent_local_style(from_path, pool), svn_dirent_local_style(to_path, pool)); }
return SVN_NO_ERROR; }